Perl: the Markov chain saw | |
PerlMonks |
Re^4: Pattern match not working sometimesby GrandFather (Saint) |
on Mar 19, 2012 at 02:14 UTC ( [id://960355]=note: print w/replies, xml ) | Need Help?? |
unpack makes it fairly clear that the code is dealing with octet (byte) oriented data without need for any further context. substr implies string handling with the possibility for utf/other encoding confusion. It's not that substr is flat out wrong in the context, just that it doesn't send as clear a message as unpack or the use of \C in a regex.
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|