#!/usr/bin/perl -w foreach $patt (@ARGV) { # Check for leading alpha character, rest alphanumeric. if ($patt =~ /^[a-zA-Z]+[_0-9a-zA-Z]*$/) { print "\tLeading alpha, then alphanumeric in \"$patt\".\n"; } }