in reply to specifying file extension in opendir function
foreach my $dir (grep -d, glob "/apps/inst2/metrica/ON-SITE/backup/sch +ema/*.tdef") { print "Opening directory $dir\n"; opendir(OLD, $dir) or die "Can't open directory $dir: $!"; while(my $file = readdir OLD) { next if $file eq '.' or $file eq '..'; print " File: $file\n" if -f $file; print " Dir: $file\n" if -d $file; print " Link: $file\n" if -l $file; } closedir OLD; }
|
---|