On 27 Sep 2007 14:47:42 -0000, vikram vikram vikram
<[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
>         I am new to perl. I am using "Active Perl-5.8.8"
>
>          I want to set environment variable in a perl script
>
>                 Ex - #!/usr/bin/perl
>                       $ENV{HAI} = "hai";
>
>
>                      and want to display the contents of the environment 
> variable in the command line after executing the script.
>
>           But it is not displaying the contents if i give
>                        echo $HAI
>
>            Please help me out
>
> Thanks in advance
> Vikram

You need to set it from the current shell, once your perl program
exits so does you env setting you made.  The ENV setting you made is
only alive throughout the life of the perl script.

Set the varible from you ~/.profile and read it in through perl.

I hope this helps


-- 
Rodrick R. Brown
http://www.rodrickbrown.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to