Randy W. Sims wrote:
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number and does contain any alphabet/s anywhere i.e. starting, end or in-between. Can somebody tell me how to do this?
How about simply m/^\d+$/
if($input =~ m/^\d+$/) { print 'I am digits hear me roar'; } else { print 'Silly rabbit, I am not all digits but must be to continue'; }
HTH
Lee.M - JupiterHost.Net
Use the Regexp::Common module:
<http://search.cpan.org/dist/Regexp-Common/>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>