Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: reprompt user input, until validation pass

by jwkrahn (Abbot)
on Oct 17, 2011 at 10:45 UTC ( [id://931885]=note: print w/replies, xml ) Need Help??


in reply to Re^2: reprompt user input, until validation pass
in thread reprompt user input, until validation pass

if($ip_no =~ /\D/ || $ip_no=~ //)

That is the same as saying:

if($ip_no =~ /\D/ || $ip_no=~ /\D/)

Because an empty match operator uses the last successfully matched regular expression.

Replies are listed 'Best First'.
Re^4: reprompt user input, until validation pass
by ansh batra (Friar) on Oct 18, 2011 at 04:43 UTC
    replace
    -- if($ip_no =~ /\D/ || $ip_no=~ //) ++ if($ip_no =~ /\D/)

Log In?
Username:
Password:

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

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

    No recent polls found