Read format problem in ksh script

I have ksh script reading file like

while read -r line
do
  echo $line
  sleep 1
#process_file $line
done<$file_nm 

I want to write this line to another file after some manuplation.Put $line giving me line after changing line format(space removed).Please help me how can i read line by keeping line format same

try like this,

echo "$line" > newfile
$ echo "         xxx     " | read var; echo "[$var]"
[xxx]
$ echo "         xxx     " | IFS= read var; echo "[$var]"
[         xxx     ]
$

Jean-Pierre.

i want to read file and put line in variable for some editing.Then i have to write that line to another file.
Please help me how i can read line without omitting space which is changing my output file format