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:
1. Keep it simple
2. Just remember to pull out 3 in the morning
3. A good puzzle will wake me up
Many. I like to torture myself
0. Socks just get in the way
Results (374 votes). Check out past polls.