When ever the $_ has <characters> between '<' and '>' I have to replace it with {characters} and place the characters below the line. The output should look as below. for example:#!/usr/bin/perl use strict; while( <DATA> ) { s/<(\w+)>/\{$1\}\n/g; print $_; } [SOUR] Por Gisela Orozco 312.527.8461/ Chicago\ <line> Por Gisela Orozco< ttl>312.527.8461/ Chicago</ttl>
[SOUR] Por Gisela Orozco 312.527.8461/ Chicago\ {line} Por Gisela Orozco {ttl} 312.527.8461/ Chicago
In reply to replace string by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |