in reply to Retunining hash values from subroutines
In addition to bart's comments, you define %UID_PATH three times:
- globally, which you don't use
- at the start of your sub
- within the while loop (the effect of which you will see when you move the 'return' out of the loop)
Keep only the second.
In Section
Seekers of Perl Wisdom