Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
sub populateQueryFields {
%queryString = ();
my $tmpStr = $ENV{ "QUERY_STRING" };
@parts = split( /\&/, $tmpStr );
foreach $part (@parts) {
( $name, $value ) = split( /\=/, $part );
$queryString{ "$name" } = $value;
}
}
URL:
http://www.site.com/cgi-bin/test.pl?login=vasia&pass=123
&populateQueryFields;
$login = $queryString{ "login" };
$pass = $queryString{ "pass" };
sub populatePostFields {
%postFields = ();
read( STDIN, $tmpStr, $ENV{ "CONTENT_LENGTH" } );
@parts = split( /\&/, $tmpStr );
foreach $part (@parts) {
( $name, $value ) = split( /\=/, $part );
$value =~ ( s/%23/\#/g );
$value =~ ( s/%2F/\//g );
$postFields{ "$name" } = $value;
}
}
<FORM ACTION="../cgi-bin/test.pl" METHOD="POST">
<INPUT TYPE="TEXT" NAME="login">
<INPUT TYPE="TEXT" NAME="pass">
...
</FORM>
&populatePostFields;
$login = $postFields{ "login" };
$pass = $postFields{ "pass" };
потсмотрите в сторону mechanize
Всеравно чет не выходит