Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: restart program on wrong user input.

by Aristotle (Chancellor)
on Aug 02, 2004 at 00:39 UTC ( [id://379156]=note: print w/replies, xml ) Need Help??


in reply to Re: restart program on wrong user input.
in thread restart program on wrong user input.

$num gt "9"

That made me blink for a second before I realized what was going on. Then I noticed you're missing the other half of the condition ($num lt "0").

You'd do better to check whether non-digits match in $num:

$num =~ /\D/

This is self-documenting and complete.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^3: restart program on wrong user input.
by BioGeek (Hermit) on Aug 02, 2004 at 01:58 UTC
    Well, now I see why the credo of perl is TIMTOWTDI!

    Thaks to everyone who provided input to this simple newbie question.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://379156]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found