in reply to Using and renaming same variables/hash within different subroutines
Where you pass references to the resource hash they are all pointing to the same thing and where you pass the value of $portoffset there can be no collision as my lexically scopes the variable to within the block.sub initialize { my ($resource_ref,$portoffset) = @_; }
If you need the subroutines not to interfere with %resources, you'll have to copy the values into a local hash for manipulation in the subroutines
|
|---|