in reply to DBI: when 1 != '1'
Interesting... very interesting. So what happens for values that are both numbers and strings? I just ran your is_number() trick against a string/number variable (actually a PVIV) and it correctly reported that there it's a number... it just also happens to be a string.
use Devel::Peek; $a = 0; scalar "$a"; Dump($a); # prove it's a PVIV with IOK and POK set print is_number($a); # returns true sub is_number { ( $_[0] & ~ $_[0] ) eq '0' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI: when 1 != '1'
by Aristotle (Chancellor) on Sep 27, 2002 at 17:51 UTC |