in reply to find position of element of array

if it's going to be consistently like this, you can do:
my $element = $array[$element_to_retrieve-1];

Where $element_to_retrieve is the variable you're passing to obtain the element you want in the array...
(untested)
meh.