in reply to Re^5: File::Temp survival and scope created by "do"
in thread File::Temp survival and scope created by "do"

It's harder to tell in haukex's version though (without the -exec option) because the shorter version as an extra:  <@> scope vK ->- so it's kind of hard to say that the scope is obviously missing :P. I'm guessing that this is the local scope, that makes local work as intended, but the scope that is *enter*ed and *leave*d (yes I very English, thank you) in the longer version is the lifetime of the scalar.

Replies are listed 'Best First'.
Re^7: File::Temp survival and scope created by "do"
by ikegami (Patriarch) on Dec 11, 2018 at 04:14 UTC

    because the shorter version as an extra: <@> scope vK ->-

    The - at the start of the line means it's not reachable, though, which is why it doesn't show when using -exec.

    Update: Clarified. It previously said "The leading - ...".