in reply to Run shell script in perl

For the solution you're likely looking for (but you did not tell us the problem to), look at Get default login environment