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/)