Though I'm not sure we can just say my $swapped = (ord($_) << 4 | ord($_) >> 4) & 0xFF; to fix it. (Don't seem to be able to wrap my head around it right now.)$ perl -le 'print ord("5") << 4' 848
Makeshifts last the longest.
In reply to Re^3: Nibble swap
by Aristotle
in thread Nibble swap
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |