I know you know this, but it's worth mentioning another big advantage of local over the hand-coded equivalents exampled by your respondee.
The programmer (or another at some later time) may modify the code such that it returns without restoring the original value.
With local, this won't happen. The programmer might forget, but the compiler/interpreter will not.
In reply to Re^3: Changing ENV values locally
by BrowserUk
in thread Changing ENV values locally
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |