++ for mentioning the -n Bash operator, I wasn't aware of the string testing operators in Bash. I was shocked to find out that Bash uses == for strings and -eq for integers.
I found a stackoverflow node that deals with the empty string issue and the best answer for Perl seemed to be to use the length function.
return unless length $str;In reply to Re: Wrong idioms
by Lotus1
in thread Wrong idioms
by McA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |