in reply to Warning while using ternary operator
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'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Warning while using ternary operator
by tobyink (Canon) on Dec 17, 2013 at 11:51 UTC |