[wplug] Perl split on null?
larry at daberko.com
larry at daberko.com
Tue May 20 15:18:27 EDT 2008
I'm trying to split a string that's null delimited.
Hexdump shows the data as:
00000e40 2f 75 73 65 72 73 2f 6c 61 72 72 79 64 00 00 4c
|/users/larryd..L|
00000e50 61 72 72 79 20 44 61 62 65 72 6b 6f 00 2d 00 2d |arry
Daberko.-.-|
Doing in perl:
@splitresult = split (//, $value);
$joinresult = join(':', @splitresult);
print "$joinresult\n";
outputs:
/:u:s:e:r:s:/:l:a:r:r:y:d:::L:a:r:r:y: :D:a:b:e:r:k:o::-::-
Split does catch the null , but I want it to split ONLY on the null.
Suggestions?
More information about the wplug
mailing list