alokranjan has asked for the wisdom of the Perl Monks concerning the following question:

Can anyone please let me know if I can use "if" condition with the value of my hash and then decide the color of the cell in the table?

I am using Perl CGI to print my hash in table, but want to show the specific value say if it's less than 60, then cell color in red.

Thanks
Alok

Replies are listed 'Best First'.
Re: Perl CGI dynamic table cell
by afoken (Chancellor) on Aug 03, 2015 at 19:57 UTC

    Context: Table in Perl CGI

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Yep, and the solution using Spreadsheet::HTML even showed how to color the table cells!

      The way forward always starts with a minimal test.
Re: Perl CGI dynamic table cell
by 1nickt (Canon) on Aug 03, 2015 at 19:55 UTC

    Can anyone please let me know if I can use "if" condition with the value of my hash and then decide the color of the cell in the table?

    Yes, you can.

    What have you tried so far? Please post a small working script that shows how you take the values from the hash and create HTML for them, and how you try to implement the if condition.

    The way forward always starts with a minimal test.
      Thanks everyone. It's done :)