Hi I am having a small program which parses data file. The data file contains decimal values and I am not able to validate the decimal number.
For eg. the decimal number will be as follows Max Size : 99999.99 valid values : 3.00 or 745.15 or 21576.00 invalid values : 3.001 or 745.1555 or 215766.00 also 3..00 should be marked invalid. I am not good with RE but I tried following code, but I am not sure if I am in right direction. Can anybody help or guide me ? *********************************** my $a = "3.89011"; if ($a=~/^\d{0,5}\.\d{0,2}/) { print "Valid"; } else { print "Invalid"; } *********************************** or is there any perl module available to do validation of alpha, numeric and alphanumeric (with decimal) data type ? Thanks Regards Joel Mumbai, India 9821421965 __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>