Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: map {} list or do {} for list?

by McA (Priest)
on Apr 11, 2014 at 14:58 UTC ( #1081986=note: print w/replies, xml ) Need Help??


in reply to Re: map {} list or do {} for list?
in thread map {} list or do {} for list?

Have you seen this post concerning each?

http://blogs.perl.org/users/rurban/2014/04/do-not-use-each.html

McA

Replies are listed 'Best First'.
Re^3: map {} list or do {} for list?
by LanX (Cardinal) on Apr 11, 2014 at 15:14 UTC
    No I didn't¹ ..

    But problem ...

    a) seems to be introduced by the new randomization, so it's a bug

    and

    b) is not new, you can't nest each %hash cause it has global side-effects². In my case it's only local to the loop.

    But yeah, I would love to have something like hashgrep and hashmap in core ...

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    ¹) maybe I should switch spending time from PM to blogs.perl.org to follow Reini, Aristoteles and Damian...

    ²) maybe better phrased as "bound to the the hash ref". I can imagine situations where passing around the hashref and iterating over it in different places is useful.

      maybe I should switch spending time from PM to blogs.perl.org
      I do both. I switched from sleeping.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        not all of us have a hate relation with their family ;-b

        Cheers Rolf

        ( addicted to the Perl Programming Language)

        PS: hope to see you soon again, mate! :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2020-11-24 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?