>>>>> "Daniel" == Daniel Falkenberg <[EMAIL PROTECTED]> writes:

Daniel> Hey all,
Daniel> Just wondering if Perl is able to could how many digits there is in a
Daniel> variable.  Basically I want a user to be only able to enter 10 digits no
Daniel> more no less.  Is there a way perl can count this variable and with a
Daniel> little if/else statment I can display the result.

Daniel> Kind regards,

if ($input =~ /\A\d{10}\z/) { print "input contains exactly ten digits!\n" }

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

Reply via email to