my %hash = ('firstkey' => 'firstvalue',
'secondkey' => 'secondvalue',
'thirdkey' => 'thirdvalue');
my @array = ('secondkey', 'other element', 'still other element',
'firstkey');
my @index_array;
foreach my $element (@array) {
# QUESTION: here I'd like to have some code that returns the index number
of $element, which I'd store in $index
if ($hash{$element}) {
push (@index_array, $index);
}
}
Any suggestions would be greatly appreciated,
Birgit Kellner
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]