On Sun, 10 Jun 2001, George Petri wrote:
> But unfortunately, I've run up against another problem :(
>
> I recently did this:
>
> print $ENV{USER}, "\n";
>
> And i got "george" back as the response.
>
> Then I did this (in Bash, Linux-Mandrake 7.2):
>
> MYVARIABLE=astring
> perl -e 'print $ENV{MYVARIABLE}, "\n";'
>
> It spits out nothing...why doesn't PERL detect any of my environment
> variables? This is critical in some CGI programs that I intend to write (but
Well - because MYVARIABLE is not yet an environment variable, but a
bash-internal variable. That's the purpose of the "export" command in bash
- to export variables into the environment :-)
If you did:
export MYVARIABLE=astring
...
it would have worked.
--
Markus Peter - SPiN AG
[EMAIL PROTECTED]