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

Good idea but i can't . Because my variable takes a screenshot for a moment of my test's progress. I just want to retrieve it outside my loop. I added some code following if this helps
Lost in translation

Replies are listed 'Best First'.
Re^7: Recover a variable from a loop
by Laurent_R (Canon) on May 26, 2016 at 21:08 UTC
    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