Re: Comparing an array with hash keys

2005-09-30 Thread Peter Rabbitson
> ... or grep > > my @storage_array = grep { exists $original_hash{$_} } @original_array; > Disregard that, didn't read the question/answer well enough. Bummer... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Comparing an array with hash keys

2005-09-30 Thread Peter Rabbitson
On Fri, Sep 30, 2005 at 10:08:51AM -0400, Jeff 'japhy' Pinyan wrote: > On Sep 30, Mark Martin said: > > >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 :

Re: Comparing an array with hash keys

2005-09-30 Thread Jeff 'japhy' Pinyan
On Sep 30, Mark Martin said: 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 $