#!/usr/bin/perl -w foreach $patt (@ARGV) { # Check for 4-8 a's. if ($patt =~ /a{4,8}/) { print "\tFound 4-8 a's in \"$patt\".\n"; } }