http://qs321.pair.com?node_id=944878


in reply to Re^2: Displaying/buffering huge text files
in thread Displaying/buffering huge text files

Us N instead of non-portable J.
my $index = pack 'N', 0; $index .= pack 'N', tell FILE while <FILE>; for( my $line_idx = $s; $line_idx < $fileLastLine; $line_idx++ ) { my $line = unpack( 'N', substr($index, $line_idx*4, 4)); seek FILE, $line, 0; chomp( $_ = <FILE> ); my $line_str = $_;