I have a PERL script that currently pulls input from a single file. However, now I need to imput several files(I will not know the actual count) and I will not know the actual file name, only that the file will follow a specific file mask.
Today's example code:
$file_input = "input_boston_server.file";
open( FH_INPUT, ">$file_input");
while(chomp($inputline = <FH_INPUT>)) {
...
I now have to read in files that I know will fall under a specific file naming mask but I will not know how many files will be input. File input names can be named:
input_boston_server.file
input_newyork_server.file
input_chicago_server.file
input_dallas_server.file
input_miami_server.file
...etc etc
How can I process these input files if I do not know the full names or the count, I only know the mask. Any ideas ?
Thanks.
Today's example code:
$file_input = "input_boston_server.file";
open( FH_INPUT, ">$file_input");
while(chomp($inputline = <FH_INPUT>)) {
...
I now have to read in files that I know will fall under a specific file naming mask but I will not know how many files will be input. File input names can be named:
input_boston_server.file
input_newyork_server.file
input_chicago_server.file
input_dallas_server.file
input_miami_server.file
...etc etc
How can I process these input files if I do not know the full names or the count, I only know the mask. Any ideas ?
Thanks.