|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^3: Shortcut operator for $a->{'b'}=$b if $b;by ikegami (Patriarch) |
| on Sep 20, 2005 at 12:32 UTC ( [id://493506]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||||||||