I've tried:
$start = $ARGV[0];
if ($start eq '') {
$start = &get_start_level;
}
sub get_start_level {
print "Please Enter the Start-Level (0-7,?)[0]: ";
$input = <>;
# clear all but numbers or '?'
#if ($input ne '?') {
# $input =~ tr/!(0-9)//\d;
#}
if ($input eq '?') {
print " **** internally coded help information **** \n";
print " **** internally coded help information **** \n";
$input = &get_start_level;
} elsif (($input < 0) || ($input > 7)) {
print "please enter a number that is between Zero and Seven\n";
$input = &get_start_level;
}
return ($input);
}
=========================== end code ============
This seems to me like a pretty straight forward problem.
What am i doing wrong? ... I can't seem to figure this out.
Originally posted as a Categorized Question.