my $four; my @array = split "", (2 x 2); sub the { my $four = shift; return "two plus two is: $four"} sub answer { print shift} sub result { return $four} foreach my $two (@array) { $four += $two } answer the result;