in reply to True or False? A Quick Reference Guide
It's worth mentioning this tidbit I picked up from HOP: '0 but true' is a special-case that will not issue a warning when used in a numeric context.
$ perl -we 'print "0 but true" + 2' 2 $ perl -we 'print "0 but actually true" + 2' Argument "0 but actually true" isn't numeric in addition (+) at -e lin +e 1. 2
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|Replies are listed 'Best First'.|
Re^2: True or False? A Quick Reference Guide
by demerphq (Chancellor) on Sep 29, 2005 at 11:21 UTC
by xdg (Monsignor) on Sep 29, 2005 at 19:16 UTC
In Section Meditations