in reply to Strange grep construct

Thanks all of you! If there was something I was too "fresh" to understand, other replies actually clarified that.

Replies are listed 'Best First'.
Re^2: Strange grep construct
by LanX (Saint) on Apr 12, 2019 at 17:07 UTC
    > I was too "fresh" to understand

    No worries, I'm here for over 10 years with thousands of posts and I can't remember seeing a hash slice on an anonymous hash constructed from a map. (good to know it's possible, though)

    also the ,=> is highly idiomatic.

    I have trouble seeing a justification for this degree of golfing, other than probably (micro) optimization.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      I have trouble seeing a justification for this degree of golfing,

      Perl golf is the art of using as few characters as possible so this doesn't really qualify.

      With unnecessary characters removed:

      my@i=grep defined,@{{map{lc,$_}@a}}{map{lc}@b};
        > > this degree of golfing

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice