# getting environment variable use strict; my $userHomeDir = $ENV{"HOME"}; print $userHomeDir; # /home/xah