Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Another posible initializer

by dvergin (Monsignor)
on Dec 11, 2001 at 11:55 UTC ( #130885=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Another posible initializer
in thread Testing array of hash values

Yes indeedy. So then, to complete this exercise and return to your very legitimate concern above about maintaining this code if the number of arguments changes, we can use:
my %p; my @keys = qw( a b c ); @p{@keys} = (1) x @keys;
and slice assignment will take care of itself if we change the key list.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-01-18 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (53 votes). Check out past polls.

    Notices?