I need to be able to retrieve the contents of a file and set them to a variable.
Anyhow, this is what I have so far. I am able to return the channel fine but can't retrieve what is in the file. Here is the code snippet that I am using. Keep in mind that I have left out the fully qualified path for this example:
if [catch {open /files/23068.htm r} fileId] {
set stdErr "Cannot open file"
} else {
set fileOutput [read -nonewline $fileId]
close $fileId
}
TIA
Harold
Anyhow, this is what I have so far. I am able to return the channel fine but can't retrieve what is in the file. Here is the code snippet that I am using. Keep in mind that I have left out the fully qualified path for this example:
if [catch {open /files/23068.htm r} fileId] {
set stdErr "Cannot open file"
} else {
set fileOutput [read -nonewline $fileId]
close $fileId
}
TIA
Harold