Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Forcing list context. Brackets (with list within) as an unary right-associative operator

by choroba (Cardinal)
on Mar 01, 2019 at 13:31 UTC ( [id://1230714]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found