use Unix::PasswdFile; $pw = new Unix::PasswdFile "/etc/passwd"; my $realname = $pw->gecos("toto");