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


in reply to Re^6: selecting columns from a tab-separated-values file
in thread selecting columns from a tab-separated-values file

With 80GB of data and 384GB of ram, I's remove IO thrash from the picture entirely by slurping the entire dataset into ram first. Something like this:

#! perl -slw use strict; open my $fh, '<:raw', $ARGV[ 0 ] or die $!; sysread $fh, my $slurp, -s( $ARGV[0] ); close $fh; local $, = "\t"; open RAM, '<', \$slurp; while( <RAM> ) { my @f = split "\t"; print @f[ 2,0,5 ], }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.