in reply to Re^3: Conditional statement in HTML code.
in thread Conditional statement in HTML code.

Thanks. This is a while loop, so my mistake was not assigning the $color value inside the loop. It's working now.
  • Comment on Re^4: Conditional statement in HTML code.

Replies are listed 'Best First'.
Re^5: Conditional statement in HTML code.
by poj (Abbot) on Feb 06, 2018 at 18:56 UTC
      This is working below: if ($ref->{'status'} =~ /Open/i) { $color = 'green' ; } else { $color = 'red' ; } ;