in reply to Behaviour of unpack() with the Z template

Z is meant to allow the conversion to and from C-style strings. As such, unpack 'Z*' should and does remove the NUL. As mentioned, tests support this. This is a documentation error. please file a bug report by running perlbug.