Perl script to reverse bytes in file