http://www.perlmonks.org?node_id=905517


in reply to perl Expect; "set home"

Not that it's a perl problem but the -H option to sudo is probably what you want; that or use the correct shell syntax to change the HOME environment variable rather than making something up.

The cake is a lie.
The cake is a lie.
The cake is a lie.