#!/usr/bin/perl -w

$pattern = shift @ARGV;

foreach $match (grep(/$pattern/, <>)) {
  print $match;
}
