Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: converting ana array to a hash

by giulienk (Curate)
on Jul 24, 2002 at 13:19 UTC ( #184814=note: print w/ replies, xml ) Need Help??


in reply to converting ana array to a hash

1)my %hash = map {$_ => 1} @array;

2) you got to use delete $myhash{$key} to erase it from %myhash and then you're gonna have no problem as the for loop iterates over the elements of the anonymous array created by keys(%myhash)
Update: broquaint can type faster than me ;)


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g


Comment on Re: converting ana array to a hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (18)
As of 2015-07-31 20:18 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 (281 votes), past polls