setenv sets enviorment variables in a unix system. I would assume it is in a file with a leading #!/bin/sh at the top. All it does is set these enviorment variables to the corrosponding filenames when it is run by the shell.
Your assumption is correct in that you can now access these vars from a perl script using %ENV
ie. $ENV{WP_DEFAULT_CONFIG_DIR}
On other systems you may have to set the enviorment vars with: export VAR=value
To format code use
<code> and </code>
The rest can be formatted with standard HTML.
HTH
| [reply] |
VAR="this is the value of the variable"
export VAR
</offtopic nitpicking>
-Mark | [reply] [d/l] |
Now that we're nitpicking....
export VAR="foo? bar! baz..."
update: this is actually a bash thingy (or ksh. thanks tye!)
-- ar0n
| [reply] [d/l] |
The enviromnent variables are part of the environment supplied
by the operating system, just like memory and disk access.
(This is true for Unixes, i don't know about DOS)
Any program has a mechanism can set these variables in its
memory space. These values get transfered to new children
via the fork() system call. This is the reason that you can set
such variable in bash/csh/tcsh etc and then run a program
(i.e. fork) which can see these variables.
If memory serves, the C library has the info about it.
The perl way is $ENV{WHATEVER} as was mentioned above.
Cheers :) | [reply] |