#!/usr/local/bin/perl # eval "exec /usr/bin/perl -S $0 $*" if $running_under_some_shell; $search = shift @ARGV; unless ($search =~ m!^/! || $search =~ /^m/) { # die "$search: possible bad search\n"; $search = 'm!'.$search.'!'; } while (<>) { if (eval $search) { print "$ARGV: $_"; } die $@ if $@; # { print "$ARGV ($.): $_"; } # if (eof) { # Not eof(). # close(ARGV); # } } exit 0; # Local Variables: # mode: perl # End: