smturner1 has asked for the wisdom of the Perl Monks concerning the following question:
sub check_ok { my $str = shift; my $answer = shift; print "$str. Continue? y/n "; chomp ($answer) = <STDIN>; << die if 'N' eq uc $answer; if ( 'Y' ne uc $answer ) { print "Invalid response. Try again...\n"; check_ok($str); } return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compilation Error:
by choroba (Cardinal) on Jan 14, 2014 at 20:16 UTC | |
|
Re: Compilation Error:
by toolic (Bishop) on Jan 14, 2014 at 20:24 UTC | |
|
Re: Compilation Error:
by Lennotoecom (Pilgrim) on Jan 14, 2014 at 20:16 UTC |