in reply to Re: Filehandles and Arrays
in thread Filehandles and Arrays

The problem with scarfing large files into arrays is the amount of memory required. The system eventually runs out, then slow stuff like paging & swapping occur. I suspect this is what underlies the 'slurp performance problem' to which you refer . All of the methods above, including yours, are 'guilty' of hogging RAM in the same way.

I am not a Perl internals type, but I would expect that all of the program shards presented in this thread will boil down to much the same lower-level code; IOW there shouldn't be a significant difference in speed between them. If this is true (corrections cheerfully invited) then the clearest succinct method should be used if there is any chance at all that someone else will inherit your code.