in reply to Ternary operator can't be used as first argument of push
but removing either slice fails. Note that array or hash elements that you pass need not actually exist to be aliased successfully.perl -we'upd(@x[0..2]); sub upd { @_[0..2] = "a".."c" } print @x' abc
Just recently someone reported that constant folding is allowing something like this push((CONST ? @x : @y), "foo") to work. IMO, this is a bug and should not be relied upon.
|
|---|