in reply to Files within specified directory

perldoc -f glob

use File::Spec; my $path=File::Spec->catfile(qw( path to file),"*.txt"); my @files=glob($path);

Update: included directory handling with File::Spec


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan