Keep It Simple, Stupid | |
PerlMonks |
Question on "Effective Perl Programming"by jfroebe (Parson) |
on Sep 06, 2007 at 03:02 UTC ( [id://637312]=perlquestion: print w/replies, xml ) | Need Help?? |
jfroebe has asked for the wisdom of the Perl Monks concerning the following question: Hi all :) Tonight I started and finished reading the Effective Perl Programming: Writing Better Programs with Perl ISBN 0-201-41975-0. In Item 54, page 224, I'm curious as to why the authors are comparing $@ with the empty string ''.
I'm thinking the authors did the comparison for readability but my sleepy brain (been up since before time began this morning) is second guessing it. Sort of like when you know the word potato is spelled "p-o-t-a-t-o" but it still looks funny. Wouldn't it be better to just look for a true $@ (non-zero and non-empty string)?
Am I suffering from a brain fart?
Back to
Seekers of Perl Wisdom
|
|