perlNinny has asked for the wisdom of the Perl Monks concerning the following question:
How do I get only the files ending with a ,<word>
I thought this would work but I am my username:
my @versions; print "$dir\n"; opendir(DIR,$dir) || die "Can't open $dir: $!"; @versions = grep {/\b,.*?\b/ && -f "$dir/$_" } readdir(DIR); closedir DIR; print "@versions\n";
20060111 Janitored by Corion: Added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get only files ending with a ,<word>
by merlyn (Sage) on Jan 11, 2006 at 22:24 UTC | |
by spiritway (Vicar) on Jan 12, 2006 at 06:13 UTC | |
|
Re: How to get only files ending with a ,<word>
by Paladin (Vicar) on Jan 11, 2006 at 22:24 UTC | |
by perlNinny (Beadle) on Jan 11, 2006 at 22:32 UTC | |
by japhy (Canon) on Jan 11, 2006 at 22:41 UTC | |
|
Re: How to get only files ending with a ,<word>
by bart (Canon) on Jan 11, 2006 at 22:27 UTC |