Hi All!!

How can I know if a variable is exactly 6 digit long?

I tried:

   $myvar='ABCDEF';
   if ($myvar =~  /.{6}/) {
     print "TRUE";}
   else {
     print "FALSE";}

and I found that this expression is alway TRUE for {..}<=6 and become
FALSE for {..}>=7 .

Thank for help

               Marco Centemeri

-- 
************************************************************
Eng. MARCO CENTEMERI

 Telecommunication and Peripherals/Automotive Groups
 Audio & Automotive Division
 Automotive Business Unit
 Bosch Product Engineer

STMicroelectronics Srl                 Tel: +39.039.603.5784
20041 Agrate Brianza - Italy           Fax: +39.039.603.6343
Via C. Olivetti, 2                  Mobile: +39.0348.8861577
Building F11                          [EMAIL PROTECTED]
************************************************************

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to