perl -le 'my $f = 1; ($f > 0 ? @a : $a ) = ("a", "b", "c")' Assignment to both a list and a scalar at -e line 1, at EOF Execution of -e aborted due to compilation errors. #### perl -le 'my $f = -1; ($f > 0 ? @a : @b ) = ("a", "b", "c"); print "a: @a\nb: @b"' a: b: a b c perl -le 'my $f = 1; ($f > 0 ? @a : @b ) = ("a", "b", "c"); print "a: @a\nb: @b"' a: a b c b: