in reply to Don't know how to resolve

Hi,
chomp $d; if($d =~ m/^\d{6}$/) { ### use ^ and $ for start and end print "Exact match\n"; } else { print "Not Correct\n"; }
should do the trick.
8 digits will contain (a.k.a. match) 6 digits and therefore succeed.
update: chomp your input to remove the trailing newline.
Regards,
svenXY

Replies are listed 'Best First'.
Re^2: Don't know how to resolve
by Anonymous Monk on Oct 04, 2007 at 10:17 UTC
    thanks