- or download this
$Data = <DATA>;
$Data =~ s/(\[NEW\].+?)\<?(\n\[)/$1<p>$2/sg;
- or download this
#!/usr/bin/perl
while(<DATA>){
...
+ir
grandmother.<
[OLD]
- or download this
$line =~ s/\<$//; # Remove <
$line .= '<p>' if $f eq 'NEW'; # Add <p> for NEW blocks only