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

but i already declare my variable in my loop

No, you don't. You have not declared $diff_file in any part of the code which you have shown.

Replies are listed 'Best First'.
Re^4: Recover a variable from a loop
by Chaoui05 (Scribe) on May 26, 2016 at 09:31 UTC
    For this variable yes. I've just done it. But for $white, it's done .
    Lost in translation

      Declare $white outside the loop if you want to access it from outside the loop - eg. declare it where you declare $self. See Coping with Scoping.

        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