in reply to Re: Misunderstanding dereferencing
in thread Misunderstanding dereferencing

Looks like it's a well-known bug that everyone is too scared to fix
Looks like its been fixed in bleed:
$ cat /tmp/p #!/usr/bin/perl @a = qw(1 2 3); @b = qw(a b c d); push @{ $x ? @a : @b }, 'foo'; print "a: @a\n"; print "b: @b\n"; print "3: @3\n"; print "4: @4\n"; __END__ $ ./perl /tmp/p a: 1 2 3 b: a b c d 3: 4: foo

Dave.

Replies are listed 'Best First'.
Re^3: Misunderstanding dereferencing
by calin (Deacon) on Jan 11, 2007 at 23:06 UTC

    I see no error so I'm wondering what is the behaviour now. Does it push 'foo' to the array @4 (@b evaluated in scalar context) ?

    Edit: sorry I didn't read to the bottom of your code...

    Edit2: more sincerity