Instead, use
$string = $#arr == -1 ? 'True' : 'False';
If you want to assign to two different variables, use an ordinary if construct instead of the ternary operator.
In reply to Re: Unexpected Output
by moritz
in thread Unexpected Output
by k_manimuthu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |