in reply to Re^2: Store the outcome of a foreach loop in an array
in thread Store the outcome of a foreach loop in an array

$val[2] gives the third element of @val.