mldvx4 has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to know the name of each file as it is processed when fed into a scrip as run-time arguments.
perl -MEnglish -a -n -e 'print $F[0],"\n";' *.tab
Say there were five files, a.tab, b.tab, c.tab, d.tab, and e.tab. That script cycles through each on, printing them line by line. How can I find the name of the currently open file? Is there a default filehandle variable or something? I couldn't find any mention of such in the perlvar(1) manual page.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Finding the name of the current file
by Corion (Patriarch) on Nov 14, 2021 at 18:50 UTC | |
by mldvx4 (Friar) on Nov 14, 2021 at 19:44 UTC |
Back to
Seekers of Perl Wisdom