P is for Practical | |
PerlMonks |
Re: Variable scoping problemby BillKSmith (Monsignor) |
on Nov 27, 2019 at 03:47 UTC ( [id://11109298]=note: print w/replies, xml ) | Need Help?? |
Note that your problem has nothing to do with "variable scoping". There is only one package variable named $database. Neither the variable nor its name ever go out of scope before the end of the program. The value of that variable changes when the required code is executed as other monks have explained.
Bill
In Section
Seekers of Perl Wisdom
|
|