Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Subroutine processes only one file in the directoryby toolic (Bishop) |
on May 25, 2017 at 19:31 UTC ( [id://1191241]=note: print w/replies, xml ) | Need Help?? |
I see one mistake. Change:
to:
Your code always assigns $filename=1, instead of the actual file name. Prove this to yourself by printing $filename inside your sub right after the assignment. See also: Basic debugging checklist
In Section
Seekers of Perl Wisdom
|
|