On 04/03/2016 02:42 PM, Shlomi Fish wrote: > Hi Lars and all, > > On Thu, 31 Mar 2016 11:38:44 +0000 > Duncan Ferguson <duncan.fergu...@opsview.com> wrote: > >> Lars, >> >> I believe 'unpack' is the right way to go, you just need to get the template >> right ('N' in your example) >> > > in addition to unpack there are also: > > 1. http://perldoc.perl.org/functions/vec.html - perldoc -f vec. > > 2. http://perldoc.perl.org/functions/substr.html - perldoc -f substr - should > work fine on byte-based data. > > 3. https://metacpan.org/release/Data-ParseBinary - inspired by > https://pypi.python.org/pypi/construct and reportedly not too performant. [snip]
Thanks Duncan, Shlomi, and everyone. Is substr() always byte-safe? (Using perl 5.20.2 for example) Regards, Lars -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/