Thanks Philip but what is the follwing supposed to do?
$num = "aldkj654658djkd5465";
I had to remove it for it to work - wouldn't work otherwise.
To detect more than 3 repititive digits I added :
elsif ($num !~ /^(\d{7}|\d{10})$/ || $num =~(/([0-9]{2,})\1/)) {
$num = "aldkj654658djkd5465";
I had to remove it for it to work - wouldn't work otherwise.
To detect more than 3 repititive digits I added :
elsif ($num !~ /^(\d{7}|\d{10})$/ || $num =~(/([0-9]{2,})\1/)) {