unset env, array set env ... 
Author Message
 unset env, array set env ...

There is a very weird problem when I try to unset env, then array set env--
after doing so, it seems that tcl treats the env array and the actual
environment variable differently. The behavior is not what one would expect:

set array_list [array get env]
unset env
array set env $array_list
set env(01aaa) HEY
# Find out the actual environment variable using /bin/env
foreach a [lsort [exec /bin/env]] {regexp -- {(.+)=} $a _ a; lappend tmp $a}
puts "env ENV: $tmp"

# Find out tcl's own env array
puts ""
puts "tcl ENV: [lsort [array names env]]"

Is this "out-of-sync" behavior a desirable one?

Kevin



Wed, 07 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Setting value in env array crashing on Linux

2. How to set env array

3. Cannot set env array element via upvar #0

4. setting env variable array is broken under Windows.

5. append unsets env

6. can't read env(DISPLAY) from regexp with $env(DISPLAY)

7. set dos env's in clipper app??????

8. set dos env's in clipper app??????

9. Setting env variables in Linux

10. Setting env. variables

11. Setting env. variables

12. setting REMOTE_USER CGI env. var

 

 
Powered by phpBB® Forum Software