my @array = qw( app Oracle EPDMCA Oracle EPZXC ); my $ix = 0; while( $ix < $#array ) { print $array[$ix+1] if $array[ix] eq 'Oracle'; $ix++; }