in reply to Re: Re: Filename Template
in thread Filename Template
even a simple readdir should do the trick
#!/usr/bin/perl -w use strict; my $dir = '/some/dir'; my $file_re = qr/^(?:\.+|[a-zA-Z]{4}-[0-9]{8})$/; opendir(DIR, $dir) or die "opening $dir: $!\n"; for ( grep(!/$file_re/, readdir(DIR)) ) { # deal with non conforming file names here } closedir(DIR);
use perl;
|
---|
In Section
Seekers of Perl Wisdom