Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Shortcut operator for $a->{'b'}=$b if $b;by ikegami (Patriarch) |
on Sep 20, 2005 at 16:32 UTC ( [id://493506]=note: print w/replies, xml ) | Need Help?? |
You could write the operator yourself:
By the way, I'm using defined since you said you didn't want empty keys. Checking for truthfullness (as you have been doing) removes both empty and false keys. Just remove the word defined for a truth test.
In Section
Seekers of Perl Wisdom
|
|