in reply to Deleting a string which is repeating(more than once) in a file.
This is a FAQ. Please see perlfaq4 for "duplicate", or type perldoc -q duplicate at your command prompt.