in reply to
concat string with ternary operator
$cl = 'color:' . ($c_diff <= 0 ? $color_good : $color_bad) . ';';
Mind the precedence of operators.
Comment on
Re: concat string with ternary operator
Download
Code
Replies are listed 'Best First'.
Re^2: concat string with ternary operator
by
odrevet
(Acolyte)
on Jul 02, 2011 at 12:55 UTC
thanks, this worked !
[reply]
In Section
Seekers of Perl Wisdom