Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: First attempt at bringing in file for input/outputby morgon (Priest) |
on Oct 20, 2018 at 01:02 UTC ( [id://1224365]=note: print w/replies, xml ) | Need Help?? |
I'll add my two cents on top of what others have posted... Firstly I would NOT use autodie until you've learned how to deal with files without it. It's a shortcut for people that know what they are doing (and you're not quite there yet). Then ALWAYS use strict;. ALWAYS. Absolutely ALWAYS. The normal idiom for opening filehandles is this: This declares a lexical file-handle and opens it, dying if there is an error. Feel free to modify it, once you understand what it does.
In Section
Seekers of Perl Wisdom
|
|