[tpm] why aren't field counts being preserved?
fulko.hew at gmail.com
Wed Apr 28 09:44:04 PDT 2010
What am I doing wrong here???
I want to have an octet string that uses nulls to delimit fields,
and then the receiver should be able to 'split' on nulls to
restore the original array.
Empty strings in the middle of the array are preserved, but
empty strings at the end of the array are not.
I need them all to be preserved!
What am I missing?
my @x = ( 'a', 'b', 'c', ' ', 'd', '', '' );
my $f = join ("\x00", @x);
print unpack ('H*', $f), "\n\n";
@r = split ("\x00", $f);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm