summaryrefslogtreecommitdiffstats
path: root/bin/keysearch.pl
blob: 77ed25579e99487c3e8628b6ba96e14f7205d302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
#
# display the input line(s) if all patterns match
#
use warnings;
use strict;
 
my @patterns = @ARGV;
 
my $pattern;
 
LINE: while (<STDIN>) {
	for $pattern (@patterns) {
		next LINE unless m/$pattern/;
	}
	print;
}