Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: My 'perldar' tells me there is a 'better' solution for this list operation

by revdiablo (Prior)
on Nov 04, 2006 at 01:45 UTC ( #582207=note: print w/ replies, xml ) Need Help??


in reply to Re: My 'perldar' tells me there is a 'better' solution for this list operation
in thread My 'perldar' tells me there is a 'better' solution for this list operation

A couple of quick examples may make it easier to understand what a hash slice is doing. This code:

@hash{"one", "two", "three"} = 1 .. 3;

Is equivalent to:

($hash{one}, $hash{two}, $hash{three}) = 1 .. 3;

And likewise, these are equivalent:

my @list = @hash{"one", "two", "three"};

and

my @list = ($hash{one}, $hash{two}, $hash{three});


Comment on Re^2: My 'perldar' tells me there is a 'better' solution for this list operation
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-08-31 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls