Leser: 22
1 2 3 4 5 6
my $greek_file = '/path/to/greek.file'; open my $fh, '<:encoding(iso-8859-7)', $greek_file or die $!; while ( my $line = <$fh> ) { print "yes" if $line =~ /$regex/; } close $fh;
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/perl use strict; use warnings; use utf8; my $greek_file = '/path/to/greek.file'; open my $fh, '<:encoding(UTF-8)', $greek_file or die $!; print <$fh>; close $fh;
2011-01-12T07:40:05 topeg"use utf8" sollte auch STDOUT passend setzen
binmode STDOUT, ':encoding(utf8)';