Adding files matching pattern to an array
- From: justin.denick@xxxxxxxxx
- Date: 16 Nov 2006 09:16:16 -0800
I would like to create an array of files that match a pattern
my $i;
my @FILE = qw( thisfile.txt?[0-9);
for for $i (@FILE)
open FH $i or die $!;
(...some code)
where the files in the working dir could be a file named 'thisfile.txt'
which may be or may not be foloowed by a number.
.
- Follow-Ups:
- Re: Adding files matching pattern to an array
- From: Paul Lalli
- Re: Adding files matching pattern to an array
- Prev by Date: Re: How to 'conditionally' use a specified module
- Next by Date: Re: Perl - Joining of Binary values
- Previous by thread: subroutine call makes foreach exit?
- Next by thread: Re: Adding files matching pattern to an array
- Index(es):