If "<" exists at the end of line, how to convert to </p> and at the begining of the line how to add <p>#!/usr/bin/perl while(<DATA>){ s/(\w*)<$/<p>$1<\/p>/g; print $_; } __DATA__ 9912290449 *In, a law prohibiting in United States went into effect.< < 9912290450
<p>9912290449 *In, a law prohibiting in United States went into effect +.</p> <p></p> 9912290450
In reply to Add at the begining of text by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |