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
In reply to Re: Re: setting values in anonymous hash
by merlyn
in thread setting values in anonymous hash
by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |