in reply to Reducing memory usage while matching log entries
Take a look at Tie::File, this allows you to treat the file as an array without loading the entire file into memory.