in reply to Function-oriented style CGI accessing form parameters
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() ] ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Function-oriented style CGI accessing form parameters
by hmbscully (Scribe) on Aug 03, 2005 at 18:25 UTC | |
by Your Mother (Archbishop) on Aug 03, 2005 at 20:49 UTC | |
by hmbscully (Scribe) on Aug 03, 2005 at 21:14 UTC |