#!/usr/bin/perl -w foreach $patt (@ARGV) { # Check beginning. if ($patt =~ /^perl/) { print "\tFound perl at start in \"$patt\".\n"; } }