We don't bite newbies here... much | |
PerlMonks |
Re: Fastest byteswap (little endian to big endian (eg. 34127856 -> 12345678)by Eily (Monsignor) |
on Apr 14, 2015 at 07:54 UTC ( [id://1123369]=note: print w/replies, xml ) | Need Help?? |
Before v5.20 the copy on write feature of string was not activated by default. This means that you may win a little time by avoiding to copy the strings in multiple scalars: print $output pack("v*", unpack("n*", scalar <$fh>));
In Section
Seekers of Perl Wisdom
|
|