in reply to Re^3: Perl List files in directory
in thread Perl List files in directory
Hi,
I have tried your tweak, but now i'm getting an error:
Error = Illegal seak at ./script.pl line 28
$directory = "/opt/tmp/"; opendir(DIR, $directory) or die "\nCannot open dir : $!\n"; @files = grep {-f "$directory/$_" && /\.xml$/i} readdir or die "Error += $!"; closedir(DIR);
Can someone help me?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl List files in directory
by Corion (Patriarch) on Apr 24, 2014 at 14:31 UTC | |
by Anonymous Monk on Apr 24, 2014 at 14:33 UTC |