How to search for the string where (p class=) and if before the string if character '<' doesnot exists should be replaced with <. The output should be#!/usr/bin/perl while(<DATA>){ s/p\sclass=/\<p\\sclass=/g; print $_; } __DATA__ p class="Hi"> <p class="new">
<p class="Hi"> <p class="new">
In reply to replace at the begining by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |