I have a hard time matching and replacing this pattern. It works fine
for single line but when I want to replace multiple line pattern, it
doesn't seem to work. I spend a lot of time on faq but I guess I m not
smart enough to figure out where I am going wrong. I couldn't do it
using the regular exp. so I tried doing it using Tie::File.

Please help me with this.

use Tie::File;
use strict;
use warnings;

# tie array to filename using Tie::File
tie my array, 'Tie::File', 'result.txt' or die "Cannot open


for(array) {

my $pattern = "The text

to be


in differnt

lines inclunding white lines and indentation";
my $replace = " The replacing
also in
multiple lines
including indentation and white lines ";


untie array;