From: Jim Phillips (jim_at_ks.uiuc.edu)
Date: Tue Feb 17 2004 - 17:33:20 CST
The $contents is being interpreted as a csh variable rather than a tcl
variable. For an inlined script like this you need to escape the $
character with a \ so that csh will ignore it. Hence:
psfgen << ENDMOL
set contents [read [open pdbfile.list r]]
On Tue, 17 Feb 2004 scott.brown_at_abbott.com wrote:
> I'm trying to use a Tcl script to run psfgen across a series of pdb files.
> I'm having a problem with using a variable set within the script.
> Here's the important part of the script:
> psfgen << ENDMOL
> set contents [read [open pdbfile.list r]]
> puts $contents
> The following is the output I'm getting from this:
> contents: Undefined variable.
> Can anyone help me identify what I'm doing wrong? As far as I know I'm
> using valid Tcl syntax.
> Thanks for any help you can provide.
This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:37:21 CST