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

Re: Adding values from an array to a hash

by reneeb (Chaplain)
on Oct 12, 2006 at 11:27 UTC ( #577812=note: print w/replies, xml ) Need Help??


in reply to Adding values from an array to a hash

You can do this:
@locations{@locations} = (1) x scalar @locations