in reply to binary ids
As the only value of $row->{parentid} that could produce a hex value of 0x00000000 is a string of 4 ascii 0 (zero) bytes, then you could do
if ( $row->{parentid} =~ /^\0{4}$/ ) { # do something; } else { $parent_hex = '0x0' . unpack 'H*', $row->{parentid}; # do something else }
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
|---|