From: Fosiul Alam Date: 2012-08-11T20:45:23+09:00 Subject: Delete a lines from a files Hi I want to delete a line from a file after finding the lines example f.open("test.txt","w") f.each do |item| if item=~\^john\ ....... delete the line .. end how can i execute the delete commands for that line in that files?? Thanks Thanks -- Posted via http://www.ruby-forum.com/.