in reply to LWP/HTTP::Request::Common - form submission
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 |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: LWP/HTTP::Request::Common - form submission
by bdgenz (Initiate) on Dec 28, 2004 at 22:33 UTC | |
|
Re^2: LWP/HTTP::Request::Common - form submission
by bdgenz (Initiate) on Dec 28, 2004 at 22:21 UTC |