print ("Enter the number to check if it is actually a number:"); $input = ; while ($input ne "") { chop ($input); if ($input =~ /^\d+$/ | $input =~ /^\d+.\d+$/ | $input =~ /^-\d+$/ | $input =~ /^-\d+.\d+$/) { print ("Yes, it is a number\n"); } else { print ("No, it is not a number\n"); } print ("Give another input:"); $input = ; }