or you could just change this:
my $vInput = @_;
to thisL
my $vInput = @_[0];
-----Original Message-----
From: Barry Carroll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 12:03 PM
To: '[EMAIL PROTECTED]'
Subject: Newbie Question about subroutine
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]