sub after{ my $look_for = shift; my $i = 0; my $x = -@_; while(++$x){ return @_[$i..$#_] if $_[$i++] eq $look_for; } return; } @a = 'a'..'z';; print after( 'm', @a ); # n o p q r s t u v w x y z