in reply to Re^3: Possible to have regexes act on file directly (not in memory)
in thread Possible to have regexes act on file directly (not in memory)
The winner seems to be File::Map. It is less complicated to use, and at least performs in correct accordance to its documentation (unlike Sys::Mmap). ++ to leont once again.
use strict; use warnings; use File::Map 'map_file'; map_file my $map, '/usr/share/dict/words', '<'; while( $map =~ m/^(wal.*)$/mg ) { print "$1\n"; }
Though its user interface is fairly simple, it is a module where reading 100% of the documentation is probably a very good idea.
Dave
|
|---|