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
In reply to Re^3: calling external programs via cgi perl script
by Fletch
in thread calling external programs via cgi perl script
by echoangel911
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |