How to add the <p> tags output should look like#!/usr/bin/perl while(<DATA>){ if (/^({\w+})/) { $f = $1; } if ($f =~ m/({NEW}|{OLD})/ ) { print $_; } } __DATA__ {NEW} Hi How r u < I am doing fine < {OLD} Hi How r u < {OLDAGE}
Please anyone help me out{NEW} <p>Hi How r u </p><p> I am doing fine </p> {OLD} <p> Hi How r u </p>
In reply to adding tags to text by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |