http://qs1969.pair.com?node_id=774300


in reply to Using and renaming same variables/hash within different subroutines

...so that it won’t collide with same variable within another subroutine...
There shouldn't be any collision, if you 'my' something within a subroutine, that variable should be scoped only to the end of that block (i.e. to the end of the subroutine). So you can call two variables in two different subroutines the same thing.

Look here for a good explanation of 'lexical scoping' (i.e. declaring variables with 'my')

why_bird
edit: added link
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......