#!/usr/bin/perl -w

$pattern = shift @ARGV;

while ($string = <>) {
  chomp $string;
  @matches = $string =~ /$pattern/;

  if ($#matches > -1) {
    print "Match: (";
    print join(', ', @matches);
    print ")\n";
  }
}
