in reply to Recursive If statement not working.

In order for a call to be recursive, the function must be called from within itself. You do not do that here. If you want to keep a recursive structure, you could do something like:

sub autoSubmit{ print "Would you like the logs submitted? Y\\N?: "; my $autoSubmit = getInput; if ( (lc($autoSubmit) ne "y") and ($autoSubmit ne "n")) { print "You did not enter in Yes or No. Please try again\n"; $autoSubmit = autoSubmit(); } return $autoSubmit; }

However, recursion in this case seems like overkill to me, since you could just use a while loop to do the same thing:

sub autoSubmit{ print "Would you like the logs submitted? Y\\N?: "; my $autoSubmit; while (1) { $autoSubmit = getInput; last if ( (lc($autoSubmit) eq "y") or ($autoSubmit eq "n")); print "You did not enter in Yes or No. Please try again\n"; } return $autoSubmit; }

See last for some info on loop control.