in reply to Retunining hash values from subroutines
Instead, put the return statement at the end of the sub.
Instead, add a single entry in the hash for each user doing this:$UID_PATH{$USER} = $UID[5];
For optimization you could decide to return the hash ref, \%UID_PATH instead of a flattened list, but then you'd have to fix the script to use a hashref instead ofa hash, everywhere. (In languages like PHP and Javascript, there is no difference between a hash ref (or a hash. (AKA "associative array" in PHP and "object" in Javascript)
|
|---|