in reply to Re^2: unexpected modify hash in a distance with grep { $_ }
in thread unexpected modify hash in a distance with grep { $_ }

Nope, it happens because of the aliasing of the hash value inside grep, but I'm not sure how.

Interesting effect. I see your output with plain perl v5.22.2 (from 2016) on Linux x86-64 and with Strawberry v5.14.2 (from 2011) on Windows 64 bit. So this seems to be an old, unsolved problem.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^3: unexpected modify hash in a distance with grep { $_ }

Replies are listed 'Best First'.
Re^4: unexpected modify hash in a distance with grep { $_ }
by leszekdubiel (Scribe) on Dec 20, 2019 at 21:14 UTC
    Maybe I should file a bug on that? I will report bug for Debian...
      I think yes, you can do this. But link to this thread.

      Me personally I'd wait the weekend, monks tend to find related tickets or route causes pretty fast.

      But that's a philosophical question, probably p5p rather prefers closing multiple reports.

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