Oh! Thanks <@U06RGN8SSN6>
# magic
p
Oh! Thanks @Nicklaus Thompson
s
Why not just just '`source script.tcl`' ?
p
haha, I knew there was a way I couldn't figure out! Looked at eval, load, exec... was thinking more C than bash: durp! thanks!
s
I usually create script files like this:
Copy code
proc do_something {} {
  ...
  ...
  ...
}

do_something
This way all needed variables are created inside the procedure, not polluting the global namespace. when you source the script file the
do_something
proc is executed.
p
beautiful: adopted 🙂
s
@Pat Deegan Additional bonus: if you need to execute the procedure more times you just give the procedure name (
do_something
) not needing to re-read the file. Faster and cleaner.
p
Yes, that's great. Have found I need to do this if I want to pass params in.