Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WWW::Mechanize Questions

Status
Not open for further replies.

Blaqspade

Programmer
Jul 27, 2006
1
US
Ok well this is what i have so far...

Code:
use strict;
use [URL unfurl="true"]WWW::Mechanize;[/URL]
use HTML::TokeParser::Simple;
use Text::CSV;
my $mech = [URL unfurl="true"]WWW::Mechanize->new();[/URL]
my $i;
my $x;
my $sleepTime = 5;
$x = 1;
while ($x <= 3000)
{
 $i = 2;
 while ($i <= 10)
       {
        $mech->get("[URL unfurl="true"]http://www.msfan.com/top-train$x.html");[/URL]
        $mech->form_number($i);
        $mech->field("fid", "95093443");
        $mech->click("go");
        $i++;
        print ("added to train number $i on page $x");
        sleep $sleepTime;
       }
 $x++;
}

Ok so basicly what I want it to do is add my fid to each of the forms (excpet the first form) on page where $x is 2-3000 there is 10 forms on each of the pages...

Now I Get no Errors but the command prompt just stays black
 
Cross posting across different forums is considered bad karma d00d.

Pick one or the other, and wait for the thread to go stale before posting in a different forum.

Many here frequent there also ...

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top