in reply to Re^2: calling external programs via cgi perl script
in thread calling external programs via cgi perl script
You can't do that, at least not directly. When you run source foo it's in a child shell and only that child shell's environment is modified. When that shell ends, all those modifications go away. See perlfaq8, "I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible?"
You'd need to source the file and run the rest of the commands in the same subshell. Prefix the commands that need the modified environment with the source command separated by a semicolon: source foo ; some_other command
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: calling external programs via cgi perl script
by cdarke (Prior) on Mar 23, 2007 at 10:07 UTC | |
|
Re^4: calling external programs via cgi perl script
by echoangel911 (Sexton) on Mar 23, 2007 at 13:56 UTC | |
by Fletch (Bishop) on Mar 23, 2007 at 14:57 UTC |