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.
In reply to Re^4: Pattern match not working sometimes
by GrandFather
in thread Pattern match not working sometimes
by dantheman1210
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |