Comparing an array with hash keys
- From: mark.martin@xxxxxxx (Mark Martin)
- Date: Fri, 30 Sep 2005 13:59:23 +0100
Hi,
I want to compare the elements of an array with the keys in a hash. If matches are found, I want to store the values associated with the matched keys in an array for future processing :
my @storage_array = ();
foreach $item(@original array) {
if (exists $original_hash{$item}) {
push(@storage_array, ?????? )
}
}Cheers, Mark
.
- Follow-Ups:
- Re: Comparing an array with hash keys
- From: Jeff 'japhy' Pinyan
- Re: Comparing an array with hash keys
- Prev by Date: Re: generating a wordlist from an array of arrays
- Next by Date: Re: Comparing an array with hash keys
- Previous by thread: readdir question
- Next by thread: Re: Comparing an array with hash keys
- Index(es):
Relevant Pages
|