ab1447 has asked for the wisdom of the Perl Monks concerning the following question:
I would like to go through $content line by line, but I don't know where to start. Any help would be great.use warnings; use strict; use WWW::Mechanize; use DBI; # Assign url strings; my $first_url = 'http://www.ots.treas.gov/holdsq/hold.cfm?catNumber=61 +&firstview=1'; # Fetch the page $mech->get($first_url); # Submit the SelectMenu form blankly $mech->submit_form( form_name => 'SelectMenu', fields => { CATNUMBER => '61', docket => '', hcno => '', hcn1 => '', hrg => '', state => '', zip => '', ptt => '', status => '', bank => '', date_from => '', date_to => '', eff_from => '', eff_to => '' } ); # Now $mech has the returned page. Will submit the form to get the cs +v file $mech->submit_form ( form_name => 'getCSV', fields => { CATNUMBER => '61', DOCKET => '', HCNO => '', HCN1 => '', HRG => '', STATE => '', ZIP => '', PTT => '', STATUS => '', BANK => '', DATE_FROM => '', DATE_TO => '', EFF_FROM => '', EFF_TO => '' } ); # Now $mech has a reference to all the thrift holding companies # In .csv format. my $content = $mech->content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'Looping' through a variable
by ikegami (Patriarch) on Aug 30, 2007 at 22:06 UTC |