in reply to Re: simple regex match question
in thread simple regex match question
#!/usr/bin/perl use warnings; use Cwd; use File::Find; my $file_pattern ="*.txt"; find(\&d, cwd); sub d { my $file = $File::Find::name; return unless -f $file; return unless $file =~ /\Q$file_pattern\E$/; print "text file:$file\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: simple regex match question
by davido (Cardinal) on Nov 13, 2006 at 06:11 UTC |