Hi all,

I have tried to find the entered number is single digit or not..

the code is following,

#! /usrbin/perl
use strict;
use warnings;

my $tmp=<STDIN>;
if($tmp =~ m/(\d)/)
{
print"NO IS SINGLE DIGIT\n";
}
else
{
print"NO IS NOT SINGLE DIGIT\n";
}



but it always passed the condition even if we entered the more no of
digit numbers??



Thanks,
Siva

Reply via email to