for (map{{el1=>$list[2*$_], el2=>$list[2*$_+1]}} 0 .. $#list/2) { # do things with $_->{el1} and $_->{el2} }