in reply to Re^2: How to access a variable inside subroutine?
in thread How to access a variable inside subroutine?

Hi,

Thank you!! It worked!!....I have always been baffled by the "getter/setter" stuff...I still don't understand it, but still was able to run the code you wrote.

Replies are listed 'Best First'.
Re^4: How to access a variable inside subroutine?
by Anonymous Monk on Sep 06, 2020 at 22:37 UTC
    Generically speaking, "getters and setters" are any routine that you can (must ...) call to affect a value that you can't access directly – because it is inside of a closure or an object. In the general sense, they often have "side effects." For instance, calling a "color setter" actually causes the color of something to change, and also completely conceals the mechanics of how that actually happens.