my ($c); foreach $c (0 .. $#piclist) { print "$c - $piclist[$c] equals $pic\n" if ($piclist[$c] eq $pic); }