in reply to Re^2: Length of unpacked string for "hex" data
in thread Length of unpacked string for "hex" data
'A' will remove trailing NULs and whitespace.
'a' will not.
In other words,
($str) = unpack('c/A', $data);
is equivalent to
($str) = unpack('c/a', $data);
$str =~ s/[\0\s]+$//;
|
|---|