#!/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"; }
In reply to Re^2: simple regex match question
by Anonymous Monk
in thread simple regex match question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |