Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Refactoring: dumb or witty use of ternary operator?by cLive ;-) (Prior) |
on Jun 22, 2004 at 04:32 UTC ( [id://368612]=note: print w/replies, xml ) | Need Help?? |
Or am I overseeing some "important" side effect? Probably a warnings freak like me :)My guess is that the keys aren't known until the script is run, and that's your colleague's way of getting rid of the warnings. A perfectly valid way too. They are making you explicitly aware of the fact that $outhash{$str} may be undefined when you try to increment it. This would work equally well:
.02 cLive ;-)
In Section
Seekers of Perl Wisdom
|
|