Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695187]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2017-07-24 01:33 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (347 votes). Check out past polls.