#!/usr/bin/perl use strict; use warnings; use Win32::NetAdmin qw( UserGetAttributes ); my $username = Win32::LoginName(); UserGetAttributes( "", $username, my $password, my $password_age, my $privilege, my $home_dir, my $comment, my $flags, my $script_path ) or die("UserGetAttributes: $^E\n"); print "The home dir for user $username is $home_dir\n";