/usr/share/doc/libfile-map-perl/examples/fastsearch.pl is in libfile-map-perl 0.65-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #! /usr/bin/perl
use 5.010;
use strict;
use warnings;
use File::Map qw/map_file advise/;
die "Not enough arguments given\n" if @ARGV < 2;
my $regex = shift;
$regex = qr/$regex/;
for my $filename (@ARGV) {
map_file my($map), $filename;
advise $map, 'sequential';
my $match = $map =~ $regex ? "" : "n't";
say "File '$filename' does$match match";
}
|