in reply to Re^2: Avoiding Global Vars
in thread Avoiding Global Vars
If you use warnings, you'll get a warning if you redefine a new my $vrx in the same scope as the first. If it's not in the same scope, then it'll be a different $vrx, so there should be little to no chance of unintended side-effects.
Of course, the better way to deal with it would be to use a more meaningful/distinctive name so that it's unlikely that you'll have cause to re-use the name...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Avoiding Global Vars
by Melly (Chaplain) on Sep 23, 2009 at 15:29 UTC |