1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/perl for $n (@ARGV) { $mods{$n} = $n } while (<STDIN>) { chop; @a = split; $mods{$a[2]} && print "$_\n"; }