in reply to Strange grep construct

Fat comma would have interpreted lc as a string. Normal comma would have been less pretty.

The whole dereferencing is a bit complex, but it basically uses the @hash{key1, key2} slice syntax. I.e., the first map maps lower case strings from @a to their originals, this is inserted into an anonymous hash, and only the values corresponding to lowercased elements of @b are returned to the outer grep that selects the defined ones.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Strange grep construct
by mzvk (Novice) on Apr 12, 2019 at 12:29 UTC
    Ah, now I see. Thanks a lot!