in reply to Find Element of array but use the next Element
try this:
my @array = ('app', 'Oracle', 'EPDMCA', 'Oracle' ,'EPZXC'); my $found=""; while(my $element=shift @array){ if ( $element eq 'Oracle' ) { $found=shift @array; last; } } printf "%s\n",$found;
|
|---|