When I run the following (sample) script, it executes very erratically.
Sometimes it pauses then starts up, sometimes it just hangs indefinitely,
sometimes it runs smoothly (for a 100ish cycles) then hangs.

When I access the site with a regular gui browser (MS IE, Mozilla linux) it
runs instantaneously over and over

Any clues would be greatly appreciated


use WWW::Mechanize;
my $mech = WWW::Mechanize->new();

$mech->agent_alias( 'Windows IE 6');

my $cgiBase = 'https://wwws.ameritrade.com/cgi-bin/apps/';

my %page = (
        login         => 'https://wwws.ameritrade.com/apps/LogIn',
        snapQuote     => $cgiBase.'SnapQuote',

my ($userid,$password)  = ("userid","password");

        form_number => 1,
        fields    => {
                USERID    => $userid,
                PASSWORD  => $password,

print "done logging in\n";

while(1) {
        print "page retrieval: ", $mech->success,"\n";

Reply via email to