in reply to Re: Using ternary operator as lvalue in push
in thread Using ternary operator as lvalue in push

could be, i will ask him. i used a code that could be optimized by compiler:
my $c = 1; push $c>0 ? @a : @b, "foo";
maybe different settings would allow the compiler to reduce the condition at compile-time (my friend case) resulting in
push @a, "foo";
that will explain those behaviour

Oha

Replies are listed 'Best First'.
Re^3: Using ternary operator as lvalue in push
by ikegami (Patriarch) on Aug 01, 2007 at 14:19 UTC
    my $c = 1; push $c>0 ? @a : @b, "foo";
    is not optimized by the compiler. It only folds constants. $c is not a constant. On the other hand, the following would be optimized:
    use constant c => 1; push c>0 ? @a : @b, "foo";