Using Expect results in a Shell script

I am trying to write a shell script that launches an expect script and then use results of the expect script in the rest of the shell script.

The expect script is connecting to a remote host and looking up certian user info like UID and home directory. This part is working

I then want the shell script to use these results in test statement (if uid xxx exists the scp these files to their home)

How do I export the the results of the expect script to the shell script?

My TCL experiance is limited to getting the basic expect script working.

You should be able to simply redirect the output of the expect script to a file and then process that as you normally would?

It isn't as graceful as I was hoping but I think I can make that work.