Thread Readdir funktioniert in schleife nicht: Dateihandelproblem (2 answers)
Opened by Gast at 2005-07-05 00:12

esskar
 2005-07-05 01:15
#55981 #55981
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
versuch es mal so

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$lPath=$_[0];

if (-d $lPath) {
my $dir;
if(opendir($dir, $lPath)) {
while(my $filename = readdir $dir) {
next if $filename =~ m!^\.?\.!;

my $file;
    if(open($file, "< $lPath/$a")) {
        print <$file>;
          close $file;
      }
    }
    closedir $dir;
}
} else { print "ERROR" }
\n\n

<!--EDIT|esskar|1120511850-->

View full thread Readdir funktioniert in schleife nicht: Dateihandelproblem