open(DATA,"sample.txt") or die $!; while( $line=<DATA> ) { $line=~s/<(\w+)>/\{$1\}\n/g; $line=~s/<\s(\w+)>/\n\{$1\}\n/g; $line=~s/<\/\w+>//g; print $line; }
In reply to Re: replace string
by sanku
in thread replace string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |