in reply to Re: source a file in Linux using perl script
in thread source a file in Linux using perl script
TIMTOWTDI:
#!/usr/bin/perl use POSIX; use String::ShellQuote qw(shell_quote); unless (defined $ENV{CTC_HOME}) { $ENV{DONT_LOOP_FOREVER}++ or die "infinite loop detected"; exec "source ~/.bash_profile && ".shell_quote($^X, $0, @ARGV); POSIX::_exit(255); } chdir($ENV{CTC_HOME}); ...
Though, I have to admit I prefer the simpler shell wrapper solution given by Corion.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: source a file in Linux using perl script
by Corion (Patriarch) on Nov 30, 2020 at 09:50 UTC |
In Section
Seekers of Perl Wisdom