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
e
# and discard bad values
my ($vInput) = @_;
..
}
just put the sclar in brackets :)
-Original Message-
From: Mooney Christophe-CMOONEY1 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 5:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Newbie Question a
On Tue, 7 Aug 2001, Barry Carroll wrote:
> here is a snippet of the code:
>
> print ("Is your Terminal ANSI compliant?\nYes or No, \(y\) or \(n\)?\n");
First of all, get rid of those backslashes. No need to put your string in
parens. You can do this:
print "Is your Terminal ANSI compliant?\nY
take the first (and only) element in @_ and assign it to $vInput.
-Original Message-
From: Barry Carroll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 11:03 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie Question about subroutine
Hi all, i want to have a subroutine fo
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 = );
verifyInput($input);
sub verifyInput
{
# Subroutine to verify input
# Will r