foreach $foo(@foo) { $bar = 0; ... $bar = $some + $thing; }