http://qs1969.pair.com?node_id=11147149

prad001 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Team,

I am new to Perl and was wondering if you guys can help me in regards to passing more than one files in the below code;

my @files=<data/j*.*.txt>; if (@ARGV) { my $test=$ARGV[0]; $test=lc($test); print "Using $test instead\n"; @files=</data/$test*.*.txt>; print "Found @files instead\n"; } my $outfile='/data/w_c.txt'; my $lotfile='/data/completed.txt'; if (-e $outfile) { unlink $outfile; }
In the above code (my @files=<data/j*.*.txt>;) is currently having all the files starting with j*.*, But I would like to pass all the below files only;
j*.1.txt
j*.3.txt
j*.a.txt
etc..

How could I pass the list of files?

Thank you,
Pradeep