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;
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;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; }
j*.1.txt j*.3.txt j*.a.txtetc..
How could I pass the list of files?
Thank you,
Pradeep
Back to
Seekers of Perl Wisdom