in reply to Find Element of array but use the next Element
my @arr = ('app', 'Oracle', 'EPDMCA', 'Oracle' ,'EPZXC');
while (my($index,$value) = each @arr )
if($value eq "Oracle")
print "Value next to Oracle is:$arr[$index+1]\n"
... with the little problem that it does not like Oracle as last Element of @arr:
Value next to Oracle is:EPDMCA
Value next to Oracle is:EPZXC
Use of uninitialized value within @arr in concatenation (.) or string
+at 976380.pl line 11.
Value next to Oracle is:
Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
Wanted to see it, but they wouldn't reschedule it
Read the book instead
Results (249 votes). Check out past polls.