D'oh! The point of undef is that it evaluates to false in logic statements (see the compound statement section of perlsyn). So you don't need to explicitely test against it:
(oh, you don't need to bracket the conditions, when they're modifiers, and unless is the equivalent of "if not")my $user = get_userid(); print "UNDEF" unless $user; print "<p>whoa whoa whao $user" if $user;
In reply to Re: Re: Re: UBB find user id code
by tommyw
in thread UBB find user id code
by LeGo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |