|go ahead... be a heretic|
|( #3333=superdoc: print w/replies, xml )||Need Help??|
You seem to have your answer with respect to "... main rational here is to understand hash behavior in subs.". This is additional information, regarding your example code, which you may find useful.
Here's a much more succinct way to generate the output you want:
In addition to getpwent() (which iterates through all records), there's also getpwnam() (which returns a single record based on username), getpwuid() (which returns a single record based on numeric user ID) and other related functions.
While the online documentation (Fetching user and group info) lists these functions, it provides little in the way of details (return values are not even shown). For that, you can use:
In reply to Re: Retunining hash values from subroutines