R
Ronnie Laurikkala
In e.g. a Bourne shell script I can source variables and values;
#!/bin/sh
.. ${HOME}/script_common_lib
How can I source variables and values from a file
and use them in Perl-scripts?
Perl-"pseudo code":
...
source("${HOME}/script_common_lib");
$logfile = $A_LOG_FILE;
...
print "Log file name: ", $logfile;
...
And in the file '${HOME}/script_common_lib' contains e.g.:
...
export A_LOG_FILE=/tmp/foo.log
...
Best Regards,
Ronnie
#!/bin/sh
.. ${HOME}/script_common_lib
How can I source variables and values from a file
and use them in Perl-scripts?
Perl-"pseudo code":
...
source("${HOME}/script_common_lib");
$logfile = $A_LOG_FILE;
...
print "Log file name: ", $logfile;
...
And in the file '${HOME}/script_common_lib' contains e.g.:
...
export A_LOG_FILE=/tmp/foo.log
...
Best Regards,
Ronnie