Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; foreach my $field (param) { #cover multivalued fields like checkboxes? Is this correct? foreach my $value (param($field)) { #not sure what the mapping and undef are doing with the field var +iable? next if exists { map {$_ => undef } qw(city state country) } -> { $field }; #process non blank thedata variable if($value !~ /^\s*$/) { my $thedata .= "$field\:\t$value<br />"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Explanation of mapping and undef
by broquaint (Abbot) on Jun 08, 2004 at 11:09 UTC | |
|
Re: Explanation of mapping and undef
by bart (Canon) on Jun 08, 2004 at 11:15 UTC | |
by dragonchild (Archbishop) on Jun 08, 2004 at 11:56 UTC | |
|
Re: Explanation of mapping and undef
by calin (Deacon) on Jun 08, 2004 at 11:15 UTC | |
by Anonymous Monk on Jun 08, 2004 at 11:58 UTC |