Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

RE: setenv

by steveAZ98 (Monk)
on Jul 25, 2000 at 01:06 UTC ( #24189=note: print w/replies, xml ) Need Help??


in reply to setenv

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

Replies are listed 'Best First'.
RE: RE: setenv
by young perlhopper (Scribe) on Jul 25, 2000 at 01:29 UTC
    well technically setenv is a csh'ism, so you would expect to see #!/bin/csh at the top.

    the equivalent /bin/sh'ism would be

    VAR="this is the value of the variable" export VAR

    </offtopic nitpicking>
    -Mark

      Now that we're nitpicking....
      export VAR="foo? bar! baz..."

      update: this is actually a bash thingy (or ksh. thanks tye!)

      -- ar0n

        And the nitpicking continues... You've used a ksh'ism that won't work with a real /bin/sh. ;>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://24189]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-12-09 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (37 votes). Check out past polls.

    Notices?