The only trick is letting perl know where the Vars() is coming from. As kwaping, showed, you can do that by using the CGI object. You can also import it, as the POD says with ":cgi-lib"
update: ins'd a bit and added the ":cgi-lib" example too.use CGI qw(header start_html Vars pre); use Data::Dumper; print header(), start_html(); my $ref = Vars(); print pre( Dumper( $ref ) ); # or just fully qualify it + use CGI ":standard"; # ... + my %params = CGI::Vars(); print pre( Dumper( \%params ) ); # or what the POD suggests use CGI qw(:standard :cgi-lib); print pre( Dumper( [ Vars() ] ) );
In reply to Re: Function-oriented style CGI accessing form parameters
by Your Mother
in thread Function-oriented style CGI accessing form parameters
by hmbscully
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |