in reply to detecting an undefined variable
Having read the conversation so far, maybe I can help shed some light on the issue you face. It seems your root concern is that you pick-and-mix code from other places and are concerned that variables picked up along the way may cause the resultant patchwork code to behave badly.
So the first thing is use strict; use warnings; are your friend. As a general thing Perl's scope rules (where an identifier refers to the same thing) are pretty sane. That in combination with strictures will pretty quickly weed out most badness. There are a couple of particular cases to think about:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: detecting an undefined variable
by LloydRice (Beadle) on Sep 22, 2019 at 14:13 UTC | |
by GrandFather (Saint) on Sep 23, 2019 at 05:13 UTC |