Heres the problem. I have looked through a couple of perl by example books and all over the net and I still cant find a way to do this.
I have a file that I need to take a chunk of text from the middle of and place it in a file. I have all the code except for the parse text part. I know this can be done in awk, I asked the question to that forum the other day. But how can I do this in perl?
Heres what i used previously but it wont parse just the block of text that I want. This segment just starts the parse at "Text to match" and ends at the EOF being read in as STDIN.
while (<IN>) {
chomp;
if (/Text to match/ .. /Text to stop matching/) {
print OUT;
}
}
I know this isnt the way to do it so any help is greatly appreciated.
Thanks
I have a file that I need to take a chunk of text from the middle of and place it in a file. I have all the code except for the parse text part. I know this can be done in awk, I asked the question to that forum the other day. But how can I do this in perl?
Heres what i used previously but it wont parse just the block of text that I want. This segment just starts the parse at "Text to match" and ends at the EOF being read in as STDIN.
while (<IN>) {
chomp;
if (/Text to match/ .. /Text to stop matching/) {
print OUT;
}
}
I know this isnt the way to do it so any help is greatly appreciated.
Thanks