my $bashcode=<<'__bash__'; source ~/.bash_profile; perl -MData::Dumper -e 'print Dumper \%ENV'; __bash__ my $VAR1; eval qx{bash -c "$bashcode"}; my $dir = $VAR1->{CTC_HOME};
explanation here:
Re^3: How to "source" a shell file in Perl?
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: source a file in Linux using perl script
by LanX
in thread source a file in Linux using perl script
by perl_007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |