#!/usr/bin/perl -w foreach $patt (@ARGV) { # Check for a or b. if ($patt =~ /a|b/) { print "\tFound an a or b in \"$patt\".\n"; } }