develooper Front page | perl.beginners | Postings from December 2002

does perl have boolean variables?

Thread Next
From:
Ken Lehman
Date:
December 4, 2002 13:39
Subject:
does perl have boolean variables?
Message ID:
1449413DA482D311B67000508B5A12F50889EDF2@nyexchange01.summithq.com
I can't say:

#!/yadayada/perl -w
use strict;

$seen = true;

if( $seen )
{
 #whatever
}
else
{
 #something different
}

I get a bareword error, I'm using perl 5.004_04. Does perl support booleans
like this, do I need to use a package?
Thanks in advance
-Ken

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About