http://www.perlmonks.org?node_id=1039963


in reply to Re: Retunining hash values from subroutines
in thread Retunining hash values from subroutines

Thank you so very much gentlemen. You all are great :)

Mr Packetst thank you very much I think I almost had it before I even began this thread but I lost it because of the has format I used.

%UID_PATH = ("$USER" => "$UID[5]")

instead of

$UID_PATH{$USER} = "$UID[5]";

Even though my problem is solved I still like to know as to how I should write the hash like the fist instance with the arrow, if at all possible. Kindly note if I write it that way only one entry from the /etc/passwd is returned.