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 ], }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: selecting columns from a tab-separated-values file
by ibm1620 (Hermit) on Jan 24, 2013 at 01:37 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2013 at 09:01 UTC | |
by ibm1620 (Hermit) on Jan 24, 2013 at 19:38 UTC | |
by BrowserUk (Patriarch) on Jan 24, 2013 at 20:09 UTC | |
by ibm1620 (Hermit) on Jan 24, 2013 at 21:26 UTC | |
|