variables from a file

Hi I am trying to write a shell script that will read 4 lines from a file and put them in variables which will be used in the script.
Can someone tell me how can I read a line and put it in a variable?
I have tried this... but this does not work.
#! /bin/sh

cat yest | while read line
do
??? how ho I assign the line to a varible that will persist after the loop and ended?

done

....

You can't do that with sh. sh will run a loop in a subshell. Switch to ksh snd it will work.

please do not post the same question 2 times. please use your orignal thread.