From: 7stud -- Date: 2007-10-17T15:05:27+09:00 Subject: Re: How to remove "~" in those files 7stud -- wrote: This line of code: > >>@split_record=@read_file.split("~") >> > removes all '~' characters from @read_file. So, when you ask how to remove the '~' from the last line of your input, it doesn't make any sense. Are you asking how to rewrite the file itself, so that the last line doesn't end in a '~'? If you want to rewrite the file just so that split() will return different values, there is a 100.1% chance that doing that is the wrong solution. -- Posted via http://www.ruby-forum.com/.