in reply to Re: binary ids
in thread binary ids
In fact all you need is if( $parent_hex == 0 ) { blah } as the numeric comparison forces perl to convert the sv to a number and 0x00000 is correctly interpretted as 0 automagically. The problem with the if (! $parent_hex) {} example given is that without forcing numeric context perl sees the sting '0x0' which is not a null string '' and thus not false in this context.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: binary ids
by diotalevi (Canon) on Feb 10, 2003 at 21:08 UTC | |
by tachyon (Chancellor) on Feb 10, 2003 at 21:22 UTC |