in reply to Re: Problem with awk
in thread Problem with awk

Or maybe even
opendir DH, '.' or die "Couldn't open dir: $!" ; my @files = sort { $a cmp $b } map /^([^.]*).*\.pdl$/, readdir DH ; close DH;
Non-matches automatically disappear from the results of a map /(reg)ex/, @list

Makeshifts last the longest.