Re: Printing GET parameters

2004-09-05 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> > On Sep 4, Kiarra Parker said: > > >#!/usr/bin/perl -T > >use strict; use warnings; > >use CGI; > >use CGI::Carp qw(fatalsToBrowser); > > That's all excellent to see! Actually not. At least not in production code. Please make sure to remove or chang

Re: Printing GET parameters

2004-09-04 Thread Kiarra Parker
Gunnar Hjalmarsson wrote: Kiarra Parker wrote: my $parameters = $cgi->Vars(); get_params($parameters); sub get_params() { my %parameters = %{ $_ }; print $cgi->header(); print $cgi->start_html; my $p; foreach $p (sort keys(%parameters)) { print "key: $p value: $parameters{$p}\n"; } print $cgi->e

Re: Printing GET parameters

2004-09-04 Thread Gunnar Hjalmarsson
Gunnar Hjalmarsson wrote: Besides what Charles and Jeff pointed out, the get_params() function seems to be redundant. To express myself more clearly: Populating a named hash is unnecessary when you have a reference, since you easily can access respective parameter via the reference. -- Gunnar H

Re: Printing GET parameters

2004-09-04 Thread Gunnar Hjalmarsson
Kiarra Parker wrote: my $parameters = $cgi->Vars(); get_params($parameters); sub get_params() { my %parameters = %{ $_ }; print $cgi->header(); print $cgi->start_html; my $p; foreach $p (sort keys(%parameters)) { print "key: $p value: $parameters{$p}\n"; } print $cgi->end_html; } Besides what Ch

Re: Printing GET parameters

2004-09-04 Thread Jeff 'japhy' Pinyan
On Sep 4, Kiarra Parker said: >#!/usr/bin/perl -T >use strict; use warnings; >use CGI; >use CGI::Carp qw(fatalsToBrowser); That's all excellent to see! >my $cgi = new CGI; >my $parameters = $cgi->Vars(); >get_params($parameters); > >sub get_params() { > my %parameters = %{ $_ }; Two issues. Yo

RE: Printing GET parameters

2004-09-04 Thread Charles K. Clarkson
From: Kiarra Parker wrote: : Hi! I thought the following script: : : #!/usr/bin/perl -T : use strict; use warnings; : use CGI; : use CGI::Carp qw(fatalsToBrowser); : : my $cgi = new CGI; : my $parameters = $cgi->Vars(); : get_params($parameters); : : sub get_params()

Printing GET parameters

2004-09-04 Thread Kiarra Parker
Hi! I thought the following script: #!/usr/bin/perl -T use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; my $parameters = $cgi->Vars(); get_params($parameters); sub get_params() { my %parameters = %{ $_ }; print $cgi->header(); print $cgi->start_html; my $p;