note
fmerges
<p>Hi,</p>
<p>Take a look at [doc://perlop], here you'll get explained the ternary operator and a indication for what is goind wrong here.</p>
<p>The code really says this:</p>
<code>
( (exists $hash{$_} and $hash{$_} eq 'on') ? $result = 'OK' : $result ) = 'KO';
</code>
<p>And the result of the ternary operator is an assignable value so that it gets to:</p>
<code>$result = 'KO'</code>
<p>With this, it works well</p>
<code>
(exists $hash{$_} and $hash{$_} eq 'on')
? ($result = 'OK')
: ($result = 'KO');
</code>
<p>Regards,</p>
:-)
<br><br>
<b>Update:</b><br>Losed too much time to answer, so it was already answered... next time ;-)
470538
470538