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';
In reply to Re^5: Conditional statement in HTML code.
by poj
in thread Conditional statement in HTML code.
by techjohnny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |