in reply to Using ternary operator as lvalue in push
Don't rely on this to continue working: it's clearly a bug. Always use the @{ expression resulting in an arrayref } instead.use constant OS => $^O; push OS eq "linux" ? @a : @b, "tux";
Using non-constant expressions before the ?, it fails for me on 5.6.2, 5.8.0, 5.8.8, and 5.9.5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using ternary operator as lvalue in push
by dada (Chaplain) on Aug 01, 2007 at 09:54 UTC | |
by FunkyMonk (Bishop) on Aug 01, 2007 at 10:38 UTC | |
|
Re^2: Using ternary operator as lvalue in push
by oha (Friar) on Aug 01, 2007 at 09:17 UTC | |
by ikegami (Patriarch) on Aug 01, 2007 at 14:19 UTC |