in reply to Re^2: What is true and false in Perl?
in thread What is true and false in Perl?
And by the way: You are not doing numeric addition on a string, you are evaluating "0 but true" in numeric context (to 0) - therefore no warning.
That makes no sense. The correct answer is that "0 but true" is special-cased.
$ perl -wle'print 0+"0 abc"' Argument "0 abc" isn't numeric in addition (+) at -e line 1. 0 $ perl -wle'print 0+"0 but true"' 0
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: What is true and false in Perl?
by Anonymous Monk on Apr 15, 2012 at 02:16 UTC | |
by AnomalousMonk (Archbishop) on Apr 15, 2012 at 02:42 UTC |
In Section
Tutorials