Perl-Sensitive Sunglasses | |
PerlMonks |
Re: converting ana array to a hashby giulienk (Curate) |
on Jul 24, 2002 at 13:19 UTC ( [id://184814]=note: print w/replies, xml ) | Need Help?? |
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 ;)
In Section
Seekers of Perl Wisdom
|
|