in reply to Braces around a section of code
using local with a variable is one of them
my $var = 42; { local $var = 13; .. }
This is particularly useful when dealing with $@ like explained in eval doc:
L*{ local $@; # protect existing $@ eval { ... };
|
|---|