http://qs1969.pair.com?node_id=1217321


in reply to Any downsides to this slurp idiom?

You're not being any more paranoid than me. :) I always fear that the file I'm reading (usually generated by another program written by someone else) will one day be larger than available memory. As a result I almost always process input files line by line. If I need to make a temporary buffer because I'm processing a chunk of data (defined by line count, byte count, start/end markers, whatever), I'm okay with that.