in reply to shell variables with Perl

You'll find the environment variables which are exported to the perl process in the %ENV hash. The name of the variable is the key, e.g. $ENV{'PATH'}.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: shell variables with Perl
by GaijinPunch (Pilgrim) on Sep 23, 2003 at 23:22 UTC
    I actually replied to this yesterady but got busy and didn't get past the preview page.

    All good information. The %ENV hash I totally overlooked. I remember reading it a year or so ago in Learning Perl and thinking "I won't need that for a while." I was right, but now that I needed it...

    For the record, a simple...

    my $display = $ARGV[0]; $ENV{'DISPLAY'} = $display . ":0.0";
    ...worked just fine.