Thread if(-e $file) und Umlaute.. (22 answers)
Opened by GoodFella at 2007-01-16 17:12

sesth
 2007-01-17 09:54
#73276 #73276
User since
2005-02-01
181 Artikel
BenutzerIn
[default_avatar]
Hmm, bei mir funktioniert dies Beispiel mit Umlauten im Dateinamen (Perl 5.8.8 build 817):
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Tk;
use strict;

my $top = MainWindow->new();

my @types =( ['All files', '*'],
['CSV files', '.csv'],
['Excel files', '.xls'] );
my $value = $top->getOpenFile( -filetypes => \@types, -initialdir => '.' );

utf8::downgrade($value);

if (-e $value) {
print qq(existiert\n);
} else {
print $value, "\n";
}

liefert:
existiert
Gruß
Thomas

View full thread if(-e $file) und Umlaute..