Re: A subst-antial question
- From: "Busirane" <john.j.seal@xxxxxxxxx>
- Date: 22 Apr 2006 18:43:01 -0700
Don Porter wrote:
% ::comm::comm send 51395 [list array set foo $pairs]
Let me restate the question. Suppose I have a script:
set script {
array set foo $pairs
set bar $somethingElse
}
This would typically have been passed into a procedure instead of set
literally, where "pairs" and "somethingElse" would be defined in the
caller's context. I want to be able to run the same script either
locally or remotely. No preprocessing is necessary to run it locally.
I know I have to substitute variables locally before I can set them
remotely, and a simple [subst] won't do it. I don't think
[list]-ifying it in the caller's context, as you suggest, will work
either, because it'd lose the whitespace command delimiters. I could
process each line, substituting each word on the line and preserving it
as a single word, then reassembling the substituted script, but is that
the only way?
I may have oversimplified things in my original posting by using a
single-line script... sorry!
.
- Follow-Ups:
- Re: A subst-antial question
- From: Neil Madden
- Re: A subst-antial question
- From: Kip Rugger
- Re: A subst-antial question
- References:
- A subst-antial question
- From: Busirane
- Re: A subst-antial question
- From: Don Porter
- A subst-antial question
- Prev by Date: Re: Changing Canvas color
- Next by Date: Regexp help
- Previous by thread: Re: A subst-antial question
- Next by thread: Re: A subst-antial question
- Index(es):
Relevant Pages
|