opendir DIR, "Dir_With_Files" or die "Cannot open diretory: $!"; my @files = grep { /\.txt$/ } readdir DIR; closedir DIR; foreach my $file (@files) { do stuff; }
In reply to Re: How to execute the perl program on different files in the same directory
by hubb0r
in thread How to execute the perl program on different files in the same directory
by cybersmithuk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |