in reply to Re: Re: UBB find user id code
in thread UBB find user id code
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;
|
|---|