#!/usr/bin/perl -w use strict; open FILE, "<", $ARGV[1] or die $!; while(<FILE>) { print if /$ARGV[0]/; }