Think about Loose Coupling | |
PerlMonks |
Re: First attempt at bringing in file for input/outputby 1nickt (Canon) |
on Oct 19, 2018 at 22:13 UTC ( [id://1224362]=note: print w/replies, xml ) | Need Help?? |
I'll also jump in and say that you can go even further than autodie (++talexb) and use a file-handling module for this stuff. It's great that you are learning the basics of opening and closing and printing to files (++), but very quickly that stuff will become boring boilerplate, and the logical computing you do between reading and writing the file will be what you'll want to focus on. Be sure to get well-grounded in the basics, but that includes becoming familiar with the basic toolkit so you can have more fun building things :-) I recommend using Path::Tiny for file operations; it keeps things simple and easy and intuitive. For what you are doing in your test script: ... for more realistic applications:
Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|