Difference between $foo and [set foo]



Hi,
last time you helped me with a problem:

###################

set a 1,0
set b 2,0
foreach pos {a b} {
regsub -all {,} [set $pos] {.} [set pos]
}

######################

Why i must not do "$$pos" or "[eval puts $pos]" and for the seconde
substitution "$pos". I'm not a specialist in programming, I'm a
"hobby-tcler" but I want to know the difference in simple words.
Thanks
Hans


.



Relevant Pages

  • Re: regex problem
    ... s> Why isn't it deleting the value of $prev in $line? ... in a later substitution regex. ... but its cheap buffering. ...
    (comp.lang.perl.misc)
  • Re: Kodalk substitution
    ... Search the internet to find ... the substitution. ... Alessandro Serrao wrote: ... Prev by Date: ...
    (rec.photo.darkroom)
  • Re: Stupid MUSH/MUX code question
    ... the %# substitution in a room @desc also ... evaluates to the looker. ... @dig/teleport TestRoom ... Prev by Date: ...
    (rec.games.mud.tiny)
  • substitution doesnt work on all files ?
    ... I have my program working I'm totally stumped as to why the substitution only works on some of the .txt files and not all. ... opendir PDFDIR, $pdf_dir ... Prev by Date: ...
    (perl.beginners)
  • Re: foreach problem
    ... > Hans Herrmann wrote: ... >> foreach pos { ... > HTH. ... Prev by Date: ...
    (comp.lang.tcl)