Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Breaking The Rulesby runrig (Abbot) |
on May 31, 2006 at 21:09 UTC ( [id://552935]=note: print w/replies, xml ) | Need Help?? |
is there really any benifit to writing...(snip)...other than to avoid the warnings? Yes, the former is more clear in its intent, the latter is a longer and more obfuscated way of writing print $var unless $var eq '' (update: and even that may as well be just print $var ...printing an empty string shouldn't make a difference anyway...though I assume this is just a simple example and you could have, e.g., print "blah blah $foo blah" unless defined $foo)
In Section
Meditations
|
|