JackHammer has asked for the wisdom of the Perl Monks concerning the following question:
You end up with:use strict; use Data::Dumper; use CGI qw(:cgi); my $r = CGI->new(); my %hash = ( 'key1' => 'value1', 'key2' => $r->param('doesnt_exist'), 'key3' => 'value3', ); foreach my $key (keys %hash) { print "$key: $hash{$key}\n"; }
key1: value1 key2: key3 value3:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What should this do?
by chipmunk (Parson) on Dec 05, 2001 at 09:21 UTC | |
by tye (Sage) on Dec 05, 2001 at 10:18 UTC | |
by TheDamian (Vicar) on Dec 06, 2001 at 08:40 UTC | |
by JackHammer (Acolyte) on Sep 10, 2003 at 04:07 UTC |