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?\nYes or No, (y) or (n)?\n"
> sub verifyInput
> {
> # Subroutine to verify input
> # Will return the correct value
> # and discard bad values
>
> my $vInput = @_;
The problem is that you are assigning an array to a scalar, which means
your array is put into a scalar context, which means the scalar will be
assigned number of elements in the array. Since you are only passing one
argument to the sub, you just need:
sub verifyInput {
my $vInput = shift;
...
}
If you have multiple arguments, you can do:
my ($vInput1, $vInput2) = @_;
or
my $vInput1 = shift;
my $vInput2 = shift;
-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
The way I understand it, the Russians are sort of a combination of evil and
incompetence... sort of like the Post Office with tanks.
-- Emo Philips
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]