Is that what you're looking for?$_ = "host-abc:/var/log/messages::::read_intr"; if (/host-abc.*messages/) { $_ = "new string"; }
In reply to Re: replace a line when regex match...
by lithron
in thread replace a line when regex match...
by perlknight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |