Dear Monks,
I have been trying to match a line that has from 1 to eight digits and if the line has more than eight digits then I want to report an error. I have tried the following but it still matches more than 8 digits. and If I try {,8} than only matches 8 digits not less, not more!
Could you please help?
if($Number =~ m/\d{1,8}/){
$N = $Number;
}else{
print("line has more than 8 digits!\n"
}