in reply to Tutorial::What is true and false?
is being parsed as:print (defined $a) ? "Defined\n" : "Undefined\n";
You need to get rid of those parens, or add an extra layer to have print consider the entire rest of the line to be its arguments, like:(print defined $a) ? "Defined\n" : "Undefined\n";
print ((defined $a) ? "Defined\n" : "Undefined\n");
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tutorial::What is true and false?
by japhy (Canon) on May 27, 2001 at 19:47 UTC | |
|
Re: Re: Tutorial::What is true and false?
by tachyon (Chancellor) on May 27, 2001 at 20:42 UTC |