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;


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg