Hi all,
I want to replace a particular blocks only not in entire file. But I will give a new output file with replacement. Replacement should not affect other text
Input file:
Some other text
<tb>
Het blijvend beeld der Hollandse Kunst|1
De Bijbel in Holland's Schilder-cultuur|25
</tb>
Some other text
Output file:
Some other text
<tb>
<r><ce>Het blijvend beeld der Hollandse Kunst</ce><ce>1</ce></r>
</tb>
Some other text
Thank in advance.
vishwa Ramkumar
I want to replace a particular blocks only not in entire file. But I will give a new output file with replacement. Replacement should not affect other text
Code:
my $table; if(m/<tb>(.*?)<\/tb>/msg) { $table = $&; } $table =~ s/\|/<\/ce><ce>/g; #opening and closing cell $table =~ s/<ce>(.+)\n/<ce>$1<\/ce><\/r>\n/g; #for closing row $table =~ s/\n(.+)<\/ce>/\n<r><ce>$1<\/ce>/g; #for opening row print OUTFILE $_; # Here is doubt [B]how I can print entire text(output) [/B] from source but with replement in block.
Input file:
Some other text
<tb>
Het blijvend beeld der Hollandse Kunst|1
De Bijbel in Holland's Schilder-cultuur|25
</tb>
Some other text
Output file:
Some other text
<tb>
<r><ce>Het blijvend beeld der Hollandse Kunst</ce><ce>1</ce></r>
</tb>
Some other text
Thank in advance.
vishwa Ramkumar
Comment