in reply to Re^3: getfile( $filename )
in thread getfile( $filename )
Well, File::Slurp purpose is to read the entire file, so that module itself is wrong for large files. The best I've come up with in that case is something along the lines of
which doesn't really lend itself to modularization because the processing is always different.my $FH = IO::File->new ... until ( $FH->eof ) { my $chunk = $FH->read( ... ) # process $chunk }
Harley J Pig
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: getfile( $filename )
by QM (Parson) on Aug 07, 2005 at 16:12 UTC |
In Section
Cool Uses for Perl