wrote:
> my $response = $browser->post( $url,
> [ EditView:first => 'mozilla',
> EditView:last => 'bugzilla',
> EditView:mEmail => '',
> EVENTTARGET=>'subscriber:SubmitButton',
> EVENTARGUMENT=>'',
> VIEWSTATE=>'dDwxMDcyMzE',
> ]
<snip>
> when I tried to run this, the system always told me there are errors in
> these 3 lines: syntax error at line 13 near "Editview". Seems that I
> can not include ":" in the entity name. Would you guys help me how to
> figure this out? Thanks.
>
> EditView:first => 'mozilla',
> EditView:last => 'bugzilla',
> EditView:mEmail => '',
The problem here is that the => operator isn't quite magical enough.
The => is defined as a "special" comma. It is special in that it will
automatically quote its left operand *if and only if* that left operand
is a "bareword". A bareword is defined as a sequence of one or more
alpha-numeric characters. If the sequence contains anything else (such
as a colon), it is not a bareword, and the => therefore does not
automatically quote it. You are forced to quote it manually:
'EditView:first' => 'mozilla',
'EditView:last' => 'bugzilla',
'EditView:mEmail' => '',
You can read more about the => operator in
perldoc perlop
Hope this helps,
Paul Lalli