Gossamer Forum
Home : General : Perl Programming :

Variables

Quote Reply
Variables
Trying to find the calls or variables to call 3 different routines
if ($name, $email) {
print qq!...............
if ($name} {
print qq!............
} else {
print qq!<br>
If just a $name it will print only the $name
If a $name and a $email it would print the two together
Or if nether it will print a <br>
Any Ideas?
Quote Reply
Re: Variables In reply to
You mean something like this?:

Code:
if ($name && $email) {
print qq!
Content...
!;
elsif ($name) {
print qq!
Content...
!;
else {
print qq!
Content...
!;

That's just checking to see if the variables exist and they have more than a default value, i.e. they're not set to zero or nothing. Or do you mean something else?

adam