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 = $_;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Displaying/buffering huge text files
by BrowserUk (Patriarch) on Dec 23, 2011 at 03:55 UTC | |
Re^4: Displaying/buffering huge text files
by mjbiren (Initiate) on Dec 23, 2011 at 01:11 UTC |
In Section
Seekers of Perl Wisdom