If you copy stuff onto the clipboard, and then run Perl on the data (perhaps using pclip) you'll find that each line ends with 0D 0A (shown as \cM\cJ in the debugger).
chop (and chomp) only remove the 0A, not the 0D. Similarly, split(/\n/) splits on the 0A and leaves you with an array of strings each ending in 0D.
Perl's treatment of \n is very confusing, I thought that "\n" in Perl meant 0A or 0D 0A according to which platform you were on, but apparently not.
I just do another chop to get the 0D off each line - chomp does not appear to regard 0D as \n, and won't remove it.
Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.
Quick
- ($a, $b....) = unpack("A2A7...", $packed)
- push( array, list )