http://www.perlmonks.org?node_id=1014600


in reply to selecting columns from a tab-separated-values file

Maybe it makes sense to work with the file directly. When reading it line by line and then splitting lines, your program scans through the data 2 times: first time to find '\n', second time to find '\t'. If you would write program that reads file in blocks of fixed size and then scans them in search for both '\t' and '\n' then you'll be scanning that amount of data only once, which could give speed-up.