Jan Cohen wrote:
Hi all, newbie here again,

Here's a sample of some code that's confusing me:

#if ($selectRide = "LibertyRider2" || "RiderGroup")
Two key mistakes. First = is assignment, == is equality for numbers, and 'eq' is equality for strings, so essentially you are saying if you can set selectRide to one or the other value than execute the block, and hopefully you can *always* assign the value, therefore it is *always* true. Secondly you need to break your equality check into parts.

So you will want something similar to:

if (($selectRide eq 'LiberyRider2') || ($selectRide eq 'RiderGroup')) {
foreach my $my_element (@alllegs) {
print "$my_element<br>\n" unless ($my_element eq '');
}
}
else {
print "You're good for the whole ride, Coast to Coast!<br>\n";
}

Keep hammering away....

http://danconia.org


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

Reply via email to