I like that. More of what I was looking for and in just a very few lines. Thanks Dale! On Tue, 2005-03-22 at 10:53 -0500, Dale Lancaster wrote: > my @input=(1,2,3,4,3,2,1) ; > my ($j, $i) ; > grep { $i++ ; $j=$i-1 if $_ =~ /3/ and !$j ; } @input ; > print $j ;