#!/usr/bin/perl # w5.10.pl find a string - fast # Usage: time w5.10.pl king ~horn/public/tc441/e2/act1 open (FH, "$ARGV[1]") or die("Can't open $ARGV[1]"); while () { if (m/$ARGV[0]/i){ print ("$_"); } } close (FH);