in reply to Re: setting values in anonymous hash
in thread setting values in anonymous hash
map { $_ = '' unless defined } %$ref2;To eliminate the void map, and not attack the keys (which don't need attacking), I'd go with:
or for 5.6 and later:defined or $_ = "" for @$ref2{keys %$ref2};
defined or $_ = "" for values %$ref2;
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting values in anonymous hash
by Dominus (Parson) on Nov 28, 2000 at 22:37 UTC | |
by extremely (Priest) on Nov 29, 2000 at 06:36 UTC | |
|
(version question) Re (3): setting values in anonymous hash
by mwp (Hermit) on Dec 18, 2000 at 15:15 UTC | |
by chipmunk (Parson) on Dec 18, 2000 at 19:43 UTC |