If what you really want is:
Then one way to achieve this is:
($i eq 'one') ? $hash->{'name'} = "hello"."world" : 0;
Executing "0" does not give a warning, unlike executing 'nothing'.
In reply to Re: Warning while using ternary operator
by mward
in thread Warning while using ternary operator
by simonz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |