in reply to Forcing list context. Brackets (with list within) as an unary right-associative operator

Interesting. Definitely a bug in Perl, but it seems it's been already fixed:
$ blead perl -wle '$_ = "abcdefgh"; print "2" . ( m/./g )[()]' Use of uninitialized value in concatenation (.) or string at -e line 1 +. 2

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: Forcing list context. Brackets (with list within) as an unary right-associative operator
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Forcing list context. Brackets (with list within) as an unary right-associative operator
by haukex (Archbishop) on Mar 01, 2019 at 21:06 UTC

    Hm... it seems like this might be #126193, fixed by 9e59c36b (at least that's what a bisect says), fix released with Perl v5.24.

Re^2: Forcing list context. Brackets (with list within) as an unary right-associative operator
by rsFalse (Chaplain) on Mar 01, 2019 at 14:04 UTC
    Ah, nice. I have it on my v5.18.