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"'
testing
Hope this helps!
Regards,
Matt
>
> --- George Petri <[EMAIL PROTECTED]> wrote:
> >
> > 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 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
> > haven't written yet :)).
> >
> > Thanks,
> > George Petri
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/