The good news is that perl is exactly the right way to do what you describe, and the task you describe is a good way to start learning perl.
The bad news: even if people were inclined to just provide the solution to your problem, without the very small amount of perl knowledge you would need to start solving it yourself, the chances of applying someone else's solution successfully are very slim.
So you'll have to do a bit more work, i'm afraid. but we can start things off. the sequence of events you need, at its simplest:
So you need to learn about file input and output. The s/// operator will probably be the way to remove those parts you don't want, and you'll need to know a little about string matching and regular expressions to make that work. Then you'll just print what remains back to the same file (or another one).
If you need to learn about the basics of perl and the structure of a simple script, you really need the camel book. Failing that, there are tutorials here and elsewhere.
In reply to Re: script for removing certain text
by thpfft
in thread script for removing certain text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |