the simple case it's no more complex than s{^~/}{$HOME/}, but for other cases it consults C<getpwent> and does the right thing. PR: 58812 Submitted by: Lars Thegler <lars@thegler.dk>