I don't know if this is best, but I use the following to set a
csh variable to the contents of a file:
set x = `cat file`
Note that those are backquotes, and of course you can run anything in
there, even pipes.
--
spoken: mark weiser
UUCP: {seismo,allegra,brl-bmd}!umcp-cs!mark
CSNet: mark at umcp-cs
ARPA: mark.umcp-cs at CSNet-Relay