if ($ARGV[0] != "") { $user_ip = $ARGV[0]; }elsif (($ARGV[0] =~ /\D/ ) || ($ARGV[0] eq "") ){ print "Enter odd number only: "; $user_ip = ; }else{ $user_ip = ; } do{ #get mod value, if mod_off is 1 then entered number is odd otherwise ask user to enter the odd number $mod_off = find_mod_val($user_ip); if (($user_ip == "") || ($user_ip eq "") || ($user_ip eq "") || ($mod_off == 0)) { print "Enter odd number only: "; $user_ip = ; } }until($mod_off == 1); print "Good odd number ${user_ip}"; __END__