in reply to reprompt user input, until validation pass

You probably want a while loop and to prompt for the $ip_no value rather than pass it on the command line. You can prompt using print of course, and you can read a line from stdin using <>:

my $ip_no = <>; chomp $ip_no;

Note the use of chomp to remove the line end character from $ip_no.

Most of your existing code then simply gets wrapped up in the while loop. You need to decide at each place you currently use exit if you are done (the two good cases) in which case you replace the exit with last. For the cases where you want to prompt for another number replace exit with next.

Note too that you should always use strictures (use strict; use warnings;).

True laziness is hard work