foreach $equation (@this_eqn_set){ #then for each variable in the eqution foreach $variable (@this_variable_set){ ...