in reply to Ternary in void context
The ternary operator can be an lvalue. In that case I believe it is in void context. I don't know of any problem with using it in void context as a shorthand if..else construct, either, though I dislike to do that. ($var ? $yes : $no) = some_sub();
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ternary in void context
by Anonymous Monk on Nov 29, 2003 at 23:48 UTC |