Please ignore the advice that says: "You should never interrupt (which is an annoying term for this)." Sometimes this is a very useful and reasonable thing.
Suppose you read the file again: there is a good chance that reading the file into an array is a reasonable optimization when reading a file line by line, even though o / s will cache the file.
Graham Nicholls Jan 16 '16 at 2:31 on 2016-01-16 14:31
source share