http://qs321.pair.com?node_id=11121381


in reply to How to access a variable inside subroutine?

Hello Pritesh,

Even though the variable is static, it is still only visible within the block where it was declared. In your example, the variable still exists, but inaccessible from outside the counter subroutine

Hope this helps.