I couldn't understand what you are trying to do. Could you please attach the portion of your PERL code? [sathish] > How can I clear a line before replacing it? > > Am doing \r and overwriting, but sometimes the text that was there previously > is longer than the new text. > > gary