Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to determine whether $parent_hex is zero but for some reason the below comparison doesn't work# ... DBI stuff ... grab row with binary datatype $parent_hex = '0x0' . unpack("H*",$row->{parentid});
how can I successfully compare $parent_hex to 0x000000000? thanks, Michaelif ( !$parent_hex ) { #do something } else { #do something different }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: binary ids
by Paladin (Vicar) on Feb 10, 2003 at 17:26 UTC | |
by tachyon (Chancellor) on Feb 10, 2003 at 18:07 UTC | |
by diotalevi (Canon) on Feb 10, 2003 at 21:08 UTC | |
by tachyon (Chancellor) on Feb 10, 2003 at 21:22 UTC | |
|
Re: binary ids
by BrowserUk (Patriarch) on Feb 10, 2003 at 18:20 UTC |