I used this...
#! usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
my ($tofind, $no, @var);
$tofind = 'c';
$no = '0';
@var = ('a', 'b', 'c', 'd', 'e');
do {
if (@var[$no] eq $tofind) {
$no = $no + 1;
print "$tofind is at position $no";
}
$no = $no + 1;
} until ($no == 4)...