in reply to vallidating a regular expression

Hi s_gaurav1091, If I understood your question correctly then here is my try,

$totalNumber = sprintf "%02d", 1; if($totalNumber =~ /^\d{2}$/){ if($totalNumber <= 10){ print "the number is less than 10\n"; } }

If you assign two digit integer with preceding zero to the variable then that variable doesn't hold the preceding zero. Since your first condition fails. See below,

$totalNumber = 01; print $totalNumber;

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';