Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: map and grep or clear code?

by Anonymous Monk
on Jan 31, 2012 at 10:25 UTC ( #950931=note: print w/replies, xml ) Need Help??


in reply to map and grep or clear code?

Not sure why, but find myself not reaching for them ever.

Simple, you're not a perl
a real perl
an idiomatic perl programmer yet :)

Or as Modern Perl would say experienced perl hacker, not sure if he meant level 4 or 5 on the Seven Levels of Perl Mastery scale

Why would I use below ...

Because you think in terms of map and grep :)

my %filter_map = do { my $ix = 'A'; map { $ix++ => $_ } ( map { ($_) x 3 } 2 .. 6 ), ( 8 ) x 3, ( 9 ) x 4, };

Like a fighter, you think in terms of kicking and punching, not bending and expanding your knees and elbows while rotating your hips :)

Replies are listed 'Best First'.
Re^2: map and grep or clear code?
by choroba (Chancellor) on Jan 31, 2012 at 10:28 UTC
    Nice code, but I miss 7.

      Nice code, but I miss 7.

      That sum''ich was mighty hungry to i axed 'im 'fore 'e ate 9

        what language do you use? That definitely is not english nor perl. епта, можно попонятнее?
Re^2: map and grep or clear code?
by ghenry (Vicar) on Jan 31, 2012 at 12:08 UTC

    I feel comfortable saying I'm somewhere in level 4 (Expert), but have not done a JAPH and had to look up cryptocontext.

    Level 5 and 6 look very cool!

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950931]
help
Chatterbox?
[ambrus]: Ok, but if there's a POE integration, then I again suggest that you consider using IO::Async::Loop:: Poe . I don't know if that will work.
[ambrus]: So that, or if you really want something agnostic to the loop, then use curl multi. Its interface is quite reasonable (unless you use an old version),
[ambrus]: though it's very C-like (serious use of varargs so easy to pass the wrong type), and there are some minor problems (busy loop because it doesn't use the same timer as your event loop, so you have to artificially delay timer callbacks by a small amount).

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2016-12-07 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (130 votes). Check out past polls.