Re: I don't want the backslash to escape ...
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: I don't want the backslash to escape ...

From: Brian <bgriffin@model.com>
Date: Thu May 26 2005 - 19:37:56 CEST

cheizer wrote:
> Hello,
> I'm trying to do a linsert and it's removing my backlash from my
> string.
>
> Here is an example of what i'm doing...
>
> foo = "rm /Users/local/Send\ Registration"
> puts [linsert $foo 0 exec]
>
> and here is the result "exec rm {/Users/heizer1/Send Registration}"
> eventually 'm going to replace the puts with eval.

Carefully form proper lists and you shouldn't have any problems.

set foo [list rm {/Users/local/Send Registration}]
puts [linsert $foo 0 exec]
.
.
.
eval [linsert $foo 0 exec]

Semi off topic. You really should be using [file delete] instead of
[exec rm].

-Brian
Received on Thu Sep 29 14:19:24 2005