in reply to Re: system ( "source $script" )
in thread system ( "source $script" )
Hold on, that doesn't seem to work. The environment as seen by the perl script is unaffected.
setter.sh:
#!/bin/sh export VAR=SET
script.pl:
#!/usr/bin/perl
system ( ". ./setter.sh" );
print "VAR=$ENV{VAR}\n";
This gives me VAR= and was hoping for VAR=SET
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: system ( "source $script" )
by Anonyrnous Monk (Hermit) on Jan 28, 2011 at 21:44 UTC | |
by ajwood (Novice) on Jan 28, 2011 at 22:01 UTC | |
by Anonyrnous Monk (Hermit) on Jan 28, 2011 at 22:16 UTC | |
by JavaFan (Canon) on Jan 29, 2011 at 13:25 UTC | |
by eyepopslikeamosquito (Archbishop) on Jan 30, 2011 at 07:08 UTC |