in reply to Re: WWW::Mechanize Post Method - Help find error
in thread WWW::Mechanize Post Method - Help find error

Thank you for your help, i located the error.
The code
$request = new HTTP::Request(POST "http://www.abc.com/ChooseZone.aspx? +type=A" , [ '__EVENTTARGET' => "rdlZone_0", '__EVENTARGUMENT' => "", '__VIEWSTATE' => "dDw0NzUyO", 'rdlZone' => "1", ] );
has been changed to
$request = new HTTP::Request('POST'=> "http://www.abc.com/ChooseZone.a +spx? +type=A" , [ '__EVENTTARGET' => "rdlZone_0", '__EVENTARGUMENT' => "", '__VIEWSTATE' => "dDw0NzUyO", 'rdlZone' => "1", ] );
It was a matter of changing POST to 'POST'=>
Thank you for your help

Replies are listed 'Best First'.
Re: Re: Re: WWW::Mechanize Post Method - Help find error
by revdiablo (Prior) on May 18, 2004 at 16:31 UTC
    It was a matter of changing POST to 'POST'=>

    For future reference, note that the => operator is just like the comma, except it does automagic quoting of its left-hand-side. This is made exactly for the case you've shown, to eliminate the need for quoting. In other words, your line could be written as:

    $request = new HTTP::Request(POST => "...", [ __EVENTTARGET => "rdlZone_0", __EVENTARGUMENT => "", __VIEWSTATE => "dDw0NzUyO", rdlZone => "1", ] );