Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Idiom: hashes as sets

by Narveson (Chaplain)
on Jul 02, 2008 at 19:22 UTC ( #695187=note: print w/ replies, xml ) Need Help??


in reply to Re: Idiom: hashes as sets
in thread Idiom: hashes as sets

I agree, and note what this means for inserting a list:

my %set; @set{qw(I agree)} = (); print sort keys %set; # Iagree

Just didn't want you to say

@set{@list} = (undef) x scalar @list;

even though that would work.


Comment on Re^2: Idiom: hashes as sets
Select or Download Code
Re^3: Idiom: hashes as sets
by parv (Priest) on Jul 04, 2008 at 02:38 UTC
    I don't understand the reply. Could you, Narveson, please rephrase?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2015-07-05 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls