open (FILE, "sample.txt") || die "cannot open sample.txt"; while (<FILE>) { s/<\?--1-Stock3of1-->//; s/<b>This is option Stock 3 of 1<\/b>//; s/<\/\?--1-Stock3of1-->//; push (@words, $_); } close (FILE) || die "cannot close sample.txt"; open (FILE, ">sample.txt") || die "cannot open sample.txt"; foreach (@words) { print FILE; } close (FILE) || die "cannot close sample.txt";
In reply to Re: Deleting on Text File
by Gordy
in thread Deleting on Text File
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |