George -- Make sure to use 'export' on your env. variables when setting them in a
shell.
So this should work:
export MYVARIABLE=astring
on my Red Hat box this did the trick:
[mcauthorn@bubba mcauthorn]$ export MYVAR=testing
[mcauthorn@bubba mcauthorn]$ perl -e 'print "$ENV{MYVAR}\n"'
On 10 Jun 2001, at 15:16, Markus Peter wrote:
> On Sun, 10 Jun 2001, George Petri wrote:
> > 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 environm
On Sun, Jun 10, 2001 at 10:44:09PM +, George Petri wrote:
> Then I did this (in Bash, Linux-Mandrake 7.2):
>
> MYVARIABLE=astring
> perl -e 'print $ENV{MYVARIABLE}, "\n";'
I suspect you need to export MYVARIABLE.
MYVARIABLE=astring
export MYVARIABLE
or
export MYVA
On Sun, 10 Jun 2001, George Petri wrote:
> 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
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
Hi all!
Firstly, thanks to all those people who helped me with my command line
arguments problem. Special mention goes to Jeff and his "Poorgramming joke".
But unfortunately, I've run up against another problem :(
I recently did this:
print $ENV{USER}, "\n";
And i got "george" back