Yes, I know about the BEGIN trick. I could also have just moved the assignment above the sub call. That's not difficult. The annoying bit is that in a large program, it's not always clear that an assignment has not occurred even though the programmer (me, in this case) might be staring at assignment. It can look like a weird scoping issue, hence my desire for strict to catch variables that have never been assigned to as opposed to variables that are merely undefined.
| [reply] |
If you are going to mix declarations and code outside of subs, you might consider always using the BEGIN trick.
| [reply] |