chanakya has asked for the wisdom of the Perl Monks concerning the following question:
please point me to the right direction.use strict; use warnings; use File::Slurp; my $path="/tmp/test"; my @files = grep { -f and /^\d{8}\.\d{6}\.host\d\.\d{1,6}$/ } read_dir + $path; print "Got ". scalar(@files) . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What's wrong with this grep?
by JavaFan (Canon) on Nov 06, 2009 at 12:27 UTC | |
|
Re: What's wrong with this grep?
by ikegami (Patriarch) on Nov 07, 2009 at 09:35 UTC | |
|
Re: What's wrong with this grep?
by graff (Chancellor) on Nov 07, 2009 at 07:39 UTC |