[prev in list] [next in list] [prev in thread] [next in thread]
List: cgi-list
Subject: [CGI] setting a variable depending on value of two others
From: "Jann Linder" <jann () jann ! com>
Date: 1998-11-30 23:39:23
[Download RAW message or body]
hopefully this is self explanatory:
# WHEREAS $X could equal ONLY 0 or 1 AND $Y could equal ONLY 0 or 1
# (B signifies BOTH)
$Z = "B" if ($X && $Y);
$Z = "X" if ($X && !$Y);
$Z = "Y" if ($Y && !$X);
is this logic correct or could i get a wrong result some time.
if so, does the order of the statements matter?
Variable names will be different...this is just to show you what i am trying to do.
Jann
Jann Linder
Web Developer
Perl Programmer
Personal Site: http://www.jann.com/
CalendarPlus Site: http://www.calendarplus.com/
-----------------------------------------------------------------
To unsubscribe, send mail to "majordomo@jann.com" with "unsubscribe cgi-list"
in the body.
The CGI Tips & Tricks website (and archive of the list) is located
at http://www.jann.com/Perl/
cgi-list is hosted by Summit Communication Design (http://www.summitdesign.net).
Summit Communication Design is a full-service web hosting firm
providing web design, cgi programming and inter/intra-net support.
-----------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic