<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-26145200</id><updated>2026-07-24T12:55:44.234+07:00</updated><category term="SMS"/><category term="database"/><category term="ruby"/><category term="CPAN"/><category term="DBI"/><category term="GPRS"/><category term="GSM"/><category term="InnoDB"/><category term="Modem"/><category term="MyISAM"/><category term="MySQL"/><category term="Text::CSV"/><category term="data structure"/><category term="data::compare"/><category term="http headers"/><category term="introduction"/><category term="mechanize"/><category term="msaccess"/><category term="perl"/><category term="smart match"/><category term="webrat"/><title type='text'>Ruby and Perl</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-26145200.post-6149941134397802026</id><published>2010-12-03T19:34:00.000+07:00</published><updated>2010-12-03T19:34:15.445+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="data structure"/><category scheme="http://www.blogger.com/atom/ns#" term="data::compare"/><category scheme="http://www.blogger.com/atom/ns#" term="smart match"/><title type='text'>Membandingkan struktur dari variabel</title><summary type="text">Saya mempunyai beberapa array dan saya harus membandingkan array-array tersebut.

Permasalahan muncul karena elemen dari array-array tersebut adalah berupa hash, satu menit kemudian saya sudah bersiap untuk membandingkan dengan memakai kode sendiri, namun seperti kebiasaan sebelumnya, pertama-tama, saya cari terlebih dahulu modul yang diperuntukan untuk keperluan ini di http://search.cpan.org dan</summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/6149941134397802026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/6149941134397802026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/6149941134397802026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/6149941134397802026'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2010/12/membandingkan-struktur-dari-variabel.html' title='Membandingkan struktur dari variabel'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-4779342305604159814</id><published>2010-04-05T23:18:00.001+07:00</published><updated>2010-04-05T23:24:08.780+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="http headers"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="webrat"/><title type='text'>lib/webrat/adapters/mechanize.rb ignores http headers</title><summary type="text">Looks webrat ignores http headers (when we tried to manually set http headers), for example
def rating
   url_path = &#39;/rating&#39;;# + id
   header &quot;Accept&quot;, &quot;text/xml&quot;
   visit(
       @url + url_path,
       :post
   )
end
So i take a look closer into lib/webrat/adapters/mechanize.rb, and i saw this line of code inside method &#39;post&#39;
@response = mechanize.post(url, post_data), i think this is the </summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/4779342305604159814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/4779342305604159814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4779342305604159814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4779342305604159814'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2010/04/libwebratadaptersmechanizerb-ignores.html' title='lib/webrat/adapters/mechanize.rb ignores http headers'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-2574609214962160487</id><published>2010-04-01T09:41:00.007+07:00</published><updated>2010-04-01T10:32:17.744+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mechanize"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Gracefully support HTTP errors</title><summary type="text">require &#39;rubygems&#39;
require &#39;mechanize&#39;

a = Mechanize.new { |agent| agent.user_agent_alias = &#39;Mac Safari&#39;  }
a.get(:url =&gt; &#39;http://example.com&#39;,
      :headers =&gt; {&#39;Accept&#39; =&gt; &#39;text/xml&#39;, &#39;Connection&#39; =&gt;&#39;keep-live&#39;}
     )
puts a.page.body

If mechanize found error code &#39;401&#39; (for example) then mechanize will raise error message:
/usr/lib/ruby/gems/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:614:in</summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/2574609214962160487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/2574609214962160487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/2574609214962160487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/2574609214962160487'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2010/04/gracefully-support-http-errors.html' title='Gracefully support HTTP errors'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-4461572318157567712</id><published>2009-08-21T10:40:00.008+07:00</published><updated>2009-10-07T12:31:33.872+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Text::CSV"/><title type='text'>collect unique records from csv file</title><summary type="text">Follow discussion about this post on http://tech.groups.yahoo.com/group/id-perl/message/1843#!/usr/bin/perluse strict;use warnings;use Data::Dumper;use Text::CSV;$Data::Dumper::Terse=1;$Data::Dumper::Indent=0;my $csv = Text::CSV-&gt;new({                           binary   =&gt; 1,                            eol      =&gt; &quot;\n&quot;,                            sep_char =&gt; &#39;;&#39;                        });#for </summary><link rel='enclosure' type='' href='http://pastie.org/590706' length='0'/><link rel='enclosure' type='' href='http://tech.groups.yahoo.com/group/id-perl/message/1843' length='0'/><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/4461572318157567712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/4461572318157567712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4461572318157567712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4461572318157567712'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2009/08/for-more-real-app-use-getoptlong-open.html' title='collect unique records from csv file'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-3933455178224734227</id><published>2008-11-14T16:54:00.001+07:00</published><updated>2010-04-06T08:34:20.724+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="InnoDB"/><category scheme="http://www.blogger.com/atom/ns#" term="MyISAM"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MyISAM vs InnoDB</title><summary type="text">Ini pembicaraan saya dengan prof, tentang MyISAM dan InnoDB, mudah-mudahan bermanfaat

(4:23:59 PM) doctor_moron: saya baca post nya prof tentang myisam vs innodb
(4:24:08 PM) EP: di mana?
(4:24:21 PM) doctor_moron: http://tech.groups.yahoo.com/group/id-mysql/message/450
(4:24:31 PM) EP: pasti udah lama
(4:24:34 PM) doctor_moron: iya
(4:25:02 PM) EP: makin tua makin males
(4:25:19 PM) </summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/3933455178224734227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/3933455178224734227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/3933455178224734227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/3933455178224734227'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/11/myisam-vs-innodb.html' title='MyISAM vs InnoDB'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-3918326948464896451</id><published>2008-11-13T12:15:00.004+07:00</published><updated>2008-11-13T12:28:48.448+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="DBI"/><category scheme="http://www.blogger.com/atom/ns#" term="msaccess"/><title type='text'>Get tables &amp; columns from MS Access</title><summary type="text">#!/usr/bin/perl -wuse strict;#use Data::Dumper;use DBI;my $dsn = &#39;Driver=Microsoft Access Driver (*.mdb);           DBQ=db.mdb&#39;;my $dbh = DBI-&gt;connect(&quot;DBI:ODBC:$dsn&quot;,&#39;&#39;,&#39;&#39;,         {RaiseError=&gt;1}) or die $DBI::errstr;my $sth = $dbh-&gt;table_info(&#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;TABLE&#39;);while( my ( undef, undef, $name ) =                   $sth-&gt;fetchrow_array() ) {    print &quot;$name: \n&quot;;    my $colsth = $dbh-&gt;</summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/3918326948464896451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/3918326948464896451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/3918326948464896451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/3918326948464896451'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/11/get-tables-columns-from-ms-access.html' title='Get tables &amp; columns from MS Access'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-7063114074368296658</id><published>2008-07-29T00:00:00.004+07:00</published><updated>2008-07-29T02:00:06.266+07:00</updated><title type='text'>Dispatch Table Versus Big elsif</title><summary type="text">Yang dimaksud dengan big elsif itu adalah baris kode yang seperti ini:use strict;use warnings;use feature qw/say/;my $input = &amp;lt;STDIN&amp;gt; ;chomp $input;if($input eq &#39;striker&#39;) {  move_striker();} elsif($input eq &#39;winger&#39;) {  move_winger();} elsif($input eq &#39;playmaker&#39;) {  move_playmaker();} elsif($input eq &#39;stopper&#39;) {  move_stopper();} else {  unknown_player_type();}sub move_striker {  say &#39;</summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/7063114074368296658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/7063114074368296658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/7063114074368296658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/7063114074368296658'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/07/dispatch-table-vs-big-elsif.html' title='Dispatch Table Versus Big elsif'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-8436817180897835521</id><published>2008-07-26T20:56:00.008+07:00</published><updated>2008-07-28T04:34:23.342+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="introduction"/><title type='text'>Closure</title><summary type="text">Mungkin, saya orang yang paling membenci istilah-istilah dalam dunia programming, mungkin saya sudah berpikiran rumit terlebih dahulu tentang istilah-istilah tersebut, misal object oriented, class, scaffolding dan lain sebagainya dan salah satunya adalah closure.Namun setelah melihat penjelasan sedikit dari bukunya Damian Conway, ternyata closure itu hanyalah sebuah subrutin yang bisa mengakses </summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/8436817180897835521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/8436817180897835521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/8436817180897835521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/8436817180897835521'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/07/closure.html' title='Closure'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-5391348407896886188</id><published>2008-04-12T23:06:00.003+07:00</published><updated>2008-07-28T23:31:46.691+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPAN"/><category scheme="http://www.blogger.com/atom/ns#" term="GPRS"/><category scheme="http://www.blogger.com/atom/ns#" term="GSM"/><category scheme="http://www.blogger.com/atom/ns#" term="SMS"/><title type='text'>Send SMS with Perl</title><summary type="text">#!/usr/bin/perluse strict;use warnings;use Device::Gsm;my $port = $^O =~ /Win/ ? &#39;COM6&#39; : &#39;/dev/modem&#39;;my $myport;my $gsm = new Device::Gsm(               port =&gt; $port, log =&gt; &#39;file,send.log&#39;             );die &quot;cannot create Device::Gsm object!&quot; unless $gsm;$gsm-&gt;send_sms(        content =&gt; &#39;test&#39;,        recipient =&gt; &#39;+6281220xxxx&#39;,        class     =&gt; &#39;normal&#39;     # try `flash&#39;);You can find </summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/5391348407896886188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/5391348407896886188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/5391348407896886188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/5391348407896886188'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/04/send-sms-with-perl.html' title='Send SMS with Perl'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-4273408474908998953</id><published>2008-04-11T13:11:00.001+07:00</published><updated>2008-07-28T23:54:44.449+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Modem"/><category scheme="http://www.blogger.com/atom/ns#" term="perl"/><category scheme="http://www.blogger.com/atom/ns#" term="SMS"/><title type='text'>Connect to GSM Modem - send raw AT commands</title><summary type="text">#!/usr/bin/perluse Device::Modem;my $modem = new Device::Modem( port =&gt; &#39;/dev/modem&#39;);if($modem-&gt;connect(baudrate =&gt; 9600)) {  print &quot;connected \n&quot;;} else {  print &quot;connect to modem is failed $! \n&quot;;}$modem-&gt;atsend(&#39;AT+CMGL=&quot;STO UNSENT&quot;&#39; . Device::Modem::CR);print $modem-&gt;answer();I just connect to modem and send AT+CMGL (Read SMS message, in this case STO UNSENT [message in unsent folder])</summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/4273408474908998953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/4273408474908998953' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4273408474908998953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/4273408474908998953'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2008/04/connect-to-gsm-modem-send-raw-at.html' title='Connect to GSM Modem - send raw AT commands'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26145200.post-8197540095461656000</id><published>2007-11-13T18:17:00.001+07:00</published><updated>2008-07-29T01:58:32.130+07:00</updated><title type='text'>statistik raw log kannel</title><summary type="text">Skrip ini saya bikin hanya sebagai pembanding saja dan selain dari itu memang kadang kita butuh skrip ini cuman buat mastiin kalo segala sesuatu nya ok dengan kannel.Kebanyakan log kannel itu &#39;sakit&#39; (log bearerbox) dan memang seharusnya kalo mau parse jangan yang bb-access.log tapi (mungkin) bb.log atau sb.log, so saya bikin skrip ini hanya buat iseng isengan lagi dengan Perl.#!/usr/bin/perluse </summary><link rel='replies' type='application/atom+xml' href='http://perl-zacko.blogspot.com/feeds/8197540095461656000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/26145200/8197540095461656000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/8197540095461656000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26145200/posts/default/8197540095461656000'/><link rel='alternate' type='text/html' href='http://perl-zacko.blogspot.com/2007/11/statistik-raw-log-kannel.html' title='statistik raw log kannel'/><author><name>zak</name><uri>http://www.blogger.com/profile/01139402800607788017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>