See Get default login environment and its discussion.
In reply to Re: Call shell script variables in perl by Corion in thread Call shell script variables in perl by k_manimuthu