Thread einzelne Bytes in Perl (19 answers)
Opened by campbell-bs at 2011-11-17 15:42

Gast wer
 2011-11-22 13:02
#154422 #154422
Strings werden in C als Char-Arrays behandelt.

perldoc -f pack:
Code: (dl )
1
2
3
a A string with arbitrary binary data, will be null padded.
A A text (ASCII) string, will be space padded.
Z A null-terminated (ASCIZ) string, will be null padded.


Man kann es aber auch so machen.
Code (perl): (dl )
$binary=pack('C*',split(//,$string));


Ich bin mir noch nicht sicher was genau du suchst.
Last edited: 2011-11-22 13:07:32 +0100 (CET)

View full thread einzelne Bytes in Perl