S
Soumen
Hi,
If I do following in tclsh prompt, it works;
%set i [array names env PATH]
%echo $env($i)
But if I wrap it in a.tcl, source it in tclsh prompt and call test, it
gives me following error:
can't read "env": no such variable
----------- a.tcl -----------------
proc test {} {
set i [array names env PATH]
echo $env($i)
}
--------------------------------------
%source a.tcl
%test
can't read "env": no such variable
%
Please let me know how to resolve this.
Regards,
~ Soumen
If I do following in tclsh prompt, it works;
%set i [array names env PATH]
%echo $env($i)
But if I wrap it in a.tcl, source it in tclsh prompt and call test, it
gives me following error:
can't read "env": no such variable
----------- a.tcl -----------------
proc test {} {
set i [array names env PATH]
echo $env($i)
}
--------------------------------------
%source a.tcl
%test
can't read "env": no such variable
%
Please let me know how to resolve this.
Regards,
~ Soumen