in reply to Re^6: Recover a variable from a loop
in thread Recover a variable from a loop

Sure you can: you declare the variable prior to entering the loop and populate it within the loop. Then you can access it after the end of the loop.
my $var; for my $c (1..10) { $var++; } print $var; # prints 10