The solution is to declare the variable in an outer scope:
my $new_variable; if ($condition){ # initialize $new_variable here } # far down below, you can still use $new_variable.
In reply to Re: Global Variables
by moritz
in thread Global Variables
by kmullin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |