1. Perl
  2. builtin functions
  3. here

getpwnam function - get user ID from username

To get the user ID from the username , use the getpwnam function as follows:

# Get user ID from user name
my $uid = (getpwnam'ken') [2];

Related Informatrion