Hi,
Perl kennt den Datentyp 'byte' nicht, ein "Byte-Array" kannst Du also so nicht einfach herstellen.
Wenn Du ein Perl-Array (aus Skalaren) bilden willst, die die einzelnen Bytes/Octets Deines 32bit-Integers als Elemente haben, nimmst Du
unpack():
my $int = 12345678;
my @bytes = unpack('CCCC', pack('N', $int));
In $array[0] steht das höchstwertige Byte. Soll die Byte Order umgekehrt sein, mach das pack mit 'V'.
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"