Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: What I Most Recently Learned in Perl, But Should Have Already Known

by pKai (Priest)
on Aug 23, 2006 at 08:49 UTC ( #569039=note: print w/ replies, xml ) Need Help??


in reply to Re: What I Most Recently Learned in Perl, But Should Have Already Known
in thread What I Most Recently Learned in Perl, But Should Have Already Known

That reminds me that some time back I tried to get a grip on hash slices.

In similar use to your example:

my @intersection = grep {defined} @{{map {$_=>$_} @a}}{@b}

Though in everyday life I prefer your method, since I tend to get headache from thinking about that slices and also definitely got the syntax and/or semantics wrong the first time always.


Comment on Re^2: What I Most Recently Learned in Perl, But Should Have Already Known
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2014-12-23 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (133 votes), past polls