[clue] source'ing

marcus hall marcus at tuells.org
Tue Apr 24 20:45:20 MDT 2012


On Tue, Apr 24, 2012 at 1:15 PM, David L. Willson <DLWillson at thegeek.nu> wrote:
> Can a perl script "source" a bash script, such that exported variables in
> the bash script are visible in the perl script that called it, or do I
> absolutely have to use some sort of "message in a bottle"?

Not quite sure what the point here is, but if you want to share some variable
settings between a shell script and a perl script, then you can create a
file with the variable definitions and source it into the perl script as
well as the shell script.  The assignment syntax for both languages is
compatible enough (just remember that the ''=' cannot have white space
around it for the shell.)

Marcus Hall
marcus at tuells.org


More information about the clue mailing list