Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: Question on File Handler and Subroutines in Perlby thanos1983 (Parson) |
on Mar 05, 2019 at 10:32 UTC ( [id://1230892]=note: print w/replies, xml ) | Need Help?? |
Hello again Anonymous Monk, You are welcome :) Update: Sorry I got your last question completely wrong :). You can repeat the same procedure as you open the files and instead of @ARGV use @files. Sample of code:
Update2: I think I finally understood what you mean. You want to provide a file as a parameter to the script that contains the names of the files that you want to search through for the keyword. If this is the case see bellow:
If still is not what you want provide us more information to assist you more :) Regarding your last question read this past question which contains also examples and a variety of solutions (Find filename that has the pattern in a directory). I usually prefer to use File::Find::Rule. A previously asked question with a sample of code with this module see (Re: Capturing and then opening multiple files). Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|