As the documentation for local says, your example should use my unless you are well aware of what both local and my do, and have a specific need that my does not work for.
Using strict will catch many of the cases where local was used but my makes more sense.
In reply to Re (tilly) 1: Local variables assigned to pattern matches
by tilly
in thread Local variables assigned to pattern matches
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |