in reply to UPDATE :: finding a file exist amongst many files
use warnings; use strict; use File::Find::Rule; my $dir = 'test'; my @files = File::Find::Rule->file ->name('tpsm_*') ->in($dir); for (@files){ print "$_\n"; }
In a test/ directory, I've got:
blah.txt tpsm.txt tpsm_10.txt tpsm_4.txt
Here's the output of files found matching the name I've sent in to look for:
test/tpsm_10.txt test/tpsm_4.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: finding a file exist amongst many files
by t-rex (Scribe) on Aug 25, 2016 at 14:15 UTC | |
by Corion (Patriarch) on Aug 25, 2016 at 14:22 UTC | |
by stevieb (Canon) on Aug 25, 2016 at 14:27 UTC | |
|
Re^2: finding a file exist amongst many files
by t-rex (Scribe) on Aug 26, 2016 at 08:57 UTC | |
by Anonymous Monk on Aug 26, 2016 at 09:15 UTC |