perl routing to get form values stopped working -


i use routines form data web form.
program lives in /var/www/cgi-bin on linux server.
went perl 5.10.1 5.22.1 , code below stopped working.
gives me error:
use of uninitialized value in read third line top.
can't figure out problem.

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;  } }  sub populatequeryfields { %querystring = (); $tmpstr = $env{ "query_string" }; @parts = split( /\&/, $tmpstr ); foreach $part (@parts) { ( $name, $value ) = split( /\=/, $part ); $querystring{ "$name" } = $value; } }  populatepostfields(); $strcode = $postfields{ "code" }; $strmode = $postfields{ "mode" }; $struser = $postfields{ "loginname" };  if ($strcode ne "secretcode") {  populatequeryfields();  $strcode = $querystring{ "code" };  $strmode = $querystring{ "mode" };  $struser = $querystring{ "loginname" }; } 

any appreciated. in advance.


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -