Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
ThanksI would like to match exactly 6 digit if user inputs from the command +line. The following code I used, but if I go for more than 6 digits its gett +ing fail, I am getting Exact match. Can anyone look into this ======================= 6 digit - Exact match expect that should display Not Correct ================= $d=$ARGV[0]; if($d =~ m/\d{6}/) { print "Exact match\n"; } else { print "Not Correct\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Don't know how to resolve
by svenXY (Deacon) on Oct 04, 2007 at 10:09 UTC | |
by Anonymous Monk on Oct 04, 2007 at 10:17 UTC | |
|
Re: Don't know how to resolve
by mwah (Hermit) on Oct 04, 2007 at 10:18 UTC | |
|
Re: Don't know how to resolve
by arkturuz (Curate) on Oct 04, 2007 at 10:12 UTC |