http://qs321.pair.com?node_id=281927


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;