There's more than one way to do things | |
PerlMonks |
Re^3: How to open file inside loops with file names generated using an array?by roboticus (Chancellor) |
on May 28, 2018 at 12:50 UTC ( [id://1215320]=note: print w/replies, xml ) | Need Help?? |
You missed one bit that choroba put in his code: He wrapped the filename in brockets (<>) so that whitespace at the beginning or ending of the line would be more obvious. I expect that he's thinking your code would print something like:
instead of the expected:
because you may have gotten your data from a file without remembering to chomp off the line endings. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|