I've had problems with this in this the past and found your solution to work as long as I run my script from the bash command line.

However if the script is run from a web page, I still do not get the value of the environment variable that I had set from the bash prompt or even in the .profile file. Can you shed some light on why the variables do not show up on the web page?
TIA
tony

Nahalingam Kanakavel wrote:

hi,

I think that it shows only the exported varaibles.
I tried some thing like this

-------try this----------
1) add one more variable with your own as

prompt$ MY_OWN='name'

2) then run your program your variable MY_OWN will not be in the list
but use suffix export infornt of the above line, then it will show this thing also.

prompt$ export MY_OWN='name'
now you try, see the changes.

On 9/8/05, Gergely Buday <[EMAIL PROTECTED]> wrote:
Hi there,

why is the script

#!/usr/bin/perl
foreach $key (sort keys %ENV) {
print "$key=$ENV{$key}\n";
}

returns much less variable than

$ set

using bash?

- Gergely

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



------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.19/92 - Release Date: 9/7/2005

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


  • Re: %ENV Tony Frasketi

Reply via email to