You need to read the file into a single scalar, not an array like this:
and then use:my $file3 = do {local $/; <FILEHANDLE>};
Try this to see what did you actually pass to the POST() function:my $response = POST (URI, [ form_zone => $file3, submit => 'Submit', form_result => 'true', menu => 'edit_dns', user => 'username', auth => '*:strange_string', account => 'account_name', mbox => ''], REFERRER => LAST_PAGE);
Do you see what happened? The whole @file3 array was flattened into the array in the square brackets.my $aref = [ form_zone => @file3, submit => 'Submit', form_result => 'true', menu => 'edit_dns', user => 'username', auth => '*:strange_string', account => 'account_name', mbox => '']; print "( '", join("', '", @$aref), "')\n";
Jenda
|
We'd like to help you learn to help yourself Look around you, all you see are sympathetic eyes Stroll around the grounds until you feel at home -- P. Simon in Mrs. Robinson |
In reply to Re: LWP/HTTP::Request::Common - form submission
by Jenda
in thread LWP/HTTP::Request::Common - form submission
by bdgenz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |