in reply to specifying file extension in opendir function

No you can't use wildcards in the directory name, but you can use glob to get all matching directory names. Something like this:
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; }