Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Perl Idioms Explained - !!exprby broquaint (Abbot) |
on Jul 14, 2004 at 13:17 UTC ( [id://374293]=note: print w/replies, xml ) | Need Help?? |
Depending on context this will return different things, whereas !!expr will always return a boolean value. This will return the number of elements returned by grep as opposed to !!expr which, again, will return a boolean value. Of course both of the above are valid in appropriate situations, but if you just want a boolean value then !!expr is an appropriate idiomatic solution.
HTH
_________
In Section
Tutorials
|
|