in reply to Re: Minor querry!!
in thread Minor querry!!

Another variation on Shendal's solution could be to allow for decimals. I hardly ever work with whole numbers (not through choice, but because of the data we are responsible for here).
my $number = <STDIN>; chomp $number; if ($number !~ /^\d+\.?\d*$/) { print "$number is not a number.\n"; exit 1; } else { print "$number is a number!\n"; }
I hope this proves useful to someone. mrmick