Suppose the line is divided into two lines. How to add the start <p> tag at the start of the line. Now the ouptput is#!/usr/bin/perl while(<DATA>){ s/(.*)<$/<p>$1<\/p>/g; print $_; } __DATA__ 9912290449 *In, a law prohibiting in United States went into effect.< In, a law prohibiting in United States went into effect.< 9912290450
How to add the <p> tag. Where the output should look like9912290449 *In, a law prohibiting in United States <p>went into effect.</p> In, a law prohibiting in United States <p>went into effect.</p> 9912290450
9912290449 <p>*In, a law prohibiting in United States went into effect.</p> <p>In, a law prohibiting in United States went into effect.</p> 9912290450
In reply to Re^3: Add at the begining of text
by Anonymous Monk
in thread Add at the begining of text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |