Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 ( [id://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});

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-19 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found