in reply to Re: reading file into an array
in thread reading file into an array

While Tie::File is really cool, and all, I never recommend it to newcomers to Perl. I much rather the newcomer get a good understanding of the "primordial" features of the language, than to gloss over them with magic modules that do the same thing at arm's length.

Once someone has gotten so familiar with the primitives, that such a loop is seen as drudgery, then a module like Tie::File is an interesting diversion or convenience.

Or suggest it once someone sees the limitations or complications in the classic iteration. For example, to insert two lines before the last forty lines, it would take some marginally creative queueing to accomplish without Tie::File.

--
[ e d @ h a l l e y . c c ]