Perl: Removing NULL characters (0x00)

Alan Young alansyoungiii at
Fri Mar 4 16:46:20 MST 2005

>     What you're really looking for is pack/unpack  try this...
> unpack("A*",$value) - it's pretty common for c++ stuff to marshall a
> struct together and send it to you, and perl just sees a really long string.

Just to get rid of nulls? or do you have another reason for suggesting pack?

More information about the PLUG mailing list