Hi all, i want to have a subroutine for checking user input:
here is a snippet of the code:
print ("Is your Terminal ANSI compliant?\nYes or No, \(y\) or \(n\)?\n");
chomp ($input = <STDIN>);
verifyInput($input);
sub verifyInput
{
# Subroutine to verify input
# Will return the correct value
# and discard bad values
my $vInput = @_;
....
processing in here
....
}
The problem is that I tried entering 'y', 'n', anything!, but no luck.
I found out that $vInput is always getting assigned the numeric value '1'.
The rest of the sub after this is fine, if i could just figure out why
$vInput is being assigned '1'
Any ideas? - Thanks in advance :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]