in reply to Re^4: Conditional statement in HTML code.
in thread Conditional statement in HTML code.
Are you sure ?
== is for numeric comparison, use eq for strings.
see https://perldoc.perl.org/perlop.html#Equality-Operators
my $bgcolor = ($ref->{'status'} eq 'open') ? 'blue' : 'red';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Conditional statement in HTML code.
by techjohnny (Novice) on Feb 06, 2018 at 19:03 UTC |