in reply to Re^2: scope of variables in a sub
in thread scope of variables in a sub
Assignment in an if is fine if you're doing:
if ( my $var = something() ) { # use $var here }
(Ditto while.)
But if $var has a wider scope, it's probably a bad idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: scope of variables in a sub
by GrandFather (Saint) on Sep 24, 2020 at 21:04 UTC |