##
$b = pack("Z*C", "test", 10)
($str, $byte) = unpack("Z*C", $b);
##
##
When unpacking, a grabs everything and returns unchanged,
A grabs everything but strips from first null to the end
and trailing spaces.
Z stops after first null, the null is stripped from data.