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