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

a slightly nicer fusion of your two methods is the following:
PROMPT: { chomp($a = <STDIN>); $a =~ tr/0-9.//cd; unless (length($a)) { print "Please enter a number\n"; redo PROMPT; } }