#!/usr/bin/perl -w my $match = $ARGV[0]; while () { print "$1\n" if $_ =~ m{${match}}; }