#!/usr/bin/perl open IN, "list.old"; open OUT, ">list.html"; while(){ s/ment\">/ment\">Phillips 66 --/; s/<\/tr>//; print OUT; }