Du vermischst Byte- mit Charactersemantics. Um das mal näher zu untersuchen, Länge des Buffers gekürzt von 160 auf 2:
my @u = do {
local $/ = \2;
<DATA>;
};
print Dumper \@u;
use utf8;
__DATA__
€€€
Sobald Du utf8 einschaltest, kommen jede Menge Warnungen:
utf8 "\xE2" does not map to Unicode at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 18, <DATA> chunk 1.
utf8 "\xAC" does not map to Unicode at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 18, <DATA> chunk 2.
utf8 "\x82" does not map to Unicode at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 18, <DATA> chunk 3.
utf8 "\xE2" does not map to Unicode at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 18, <DATA> chunk 4.
utf8 "\xAC" does not map to Unicode at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 18, <DATA> chunk 5.
Malformed UTF-8 character (2 bytes, need 3, after start byte 0xe2) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0x82, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0xac, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (1 byte, need 3, after start byte 0xe2) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0x82, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0xac, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (2 bytes, need 3, after start byte 0xe2) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0x82, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
Malformed UTF-8 character (unexpected continuation byte 0xac, with no preceding start byte) in subroutine entry at C:/Perl/lib/Data/Dumper.pm line 207, <DATA> line 5.
MfG