johngg@shiraz:~/perl > perl -Mstrict -Mwarnings -E ' my $pck = pack q{Z*C}, q{test}, 0x41; my( $str, $ch ) = unpack q{Z*a}, $pck; say qq{$str, $ch};' test, A