Updated $ENV{home} to $home by using a regex capture