in reply to Re: Strange grep construct
in thread Strange grep construct

> 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

Replies are listed 'Best First'.
Re^3: Strange grep construct
by jwkrahn (Abbot) on Apr 12, 2019 at 18:21 UTC
    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