I can read/set environment variables in my tcl script (The `ECO_FINISH` environment variable in the snippet below can be set and read properly), but I am unable to increment a set environment variable (`ECO_ITER`).

```
set ::env(ECO_ITER) 0

set   fp   [open  /home/khtaur/test.txt "r"]
set   fd   [read  $fp]
set   txt  [split $fd "\n"]
close $fp

# For each line in the read file
foreach line $txt {
    # Exit the loop if no violations are reported

    if {[regexp {No violations} $txt]} {
        set ::env(ECO_FINISH) 1
    } else {
        if {$::env(ECO_ITER) != 0} {
            # This will not increment
            set  ::env(ECO_ITER) [expr {$::env(ECO_ITER) + 1}]
            puts "$::env(ECO_ITER)" # This is 0
            # Do stuff
        } else {
            # Ans so is this
            set  ::env(ECO_ITER) [expr {$::env(ECO_ITER) + 1}]
            puts "$::env(ECO_ITER)" # This is 0

            # Do stuff
        }
    }
    # Exit the loop
    break
}

```

I also tried the following but it did not fix the problem:

```
incr ::env(ECO_ITER) 1

```