my ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwnam($login); #### use User::pwent; # <-- replace getpwnam() and friends with functions returning objects my $rec = getpwnam($login); say $rec->name,' has UID ',$rec->uid,', home ',$rec->dir,', shell ',$rec->shell;