getpwuid($<) returns an array with user specific information, of which you are looking for the first element, which is the user name.
getpwuid($<)