my $username = $ENV{USER} || $ENV{LOGNAME} || `whoami`; chomp $username; # in case it came from the shell command