in reply to Re: How much was unpack()ed?
in thread How much was unpack()ed?

What? It seems to me that Z* does stop at the zero byte, it's only Z with a finite number that does not stop. Look.

$ perl -we '($a,$b)= unpack "Z*a*", "nine\0eight"; warn ">>$a<< >>$b<< +";' >>nine<< >>eight<< at -e line 1. $ perl -we '($a,$b)= unpack "Z8a*", "nine\0eight"; warn ">>$a<< >>$b<< +";' >>nine<< >>ht<< at -e line 1.

This was with perl, v5.8.1 built for i686-linux.

Update: just checked, with perl 5.6.1, I get the wrong behaviour, that is, Z* consumes all the string.