Help for this page

Select Code to Download


  1. or download this
     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.
     C  An unsigned char (octet) value.
    
  2. or download this
    use Data::Dump;
    my $data = "\x01\x02\x03\x20\x00";
    ...
    dd unpack 'Z*', $data."X ";  # prints "\1\2\3 "
    dd unpack 'A*', $data."X ";  # prints "\1\2\3 \0X"
    dd unpack 'a*', $data."X ";  # prints "\1\2\3 \0X "