How about dropping the calls to ls and gawk, and getting the list of files to iterate over in Perl?
opendir DH, '.' or die "Couldn't open dir: $!" ; my @files = sort { $a cmp $b } map { ( split /\./ )[0] } grep { /\.pdl$/ } readdir DH ; close DH ;
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
In reply to Re: Problem with awk
by DamnDirtyApe
in thread Problem with awk
by Sara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |