On Oct 30, Etienne Marcotte said:

>using $allowed = ($username eq 'admin');
>how do I check for allowed? with 1 :0 I can do if ($allowed), do I need to do
>if ($allowed eq "true")? If yes it's a little longer to write:-)

Did you bother looking at what eq returns?  It returns 1 or '', which
means you can do the exact same test.  Perl uses 1 and '' for true and
false values from its operators and functions and whatnot.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to