http://qs1969.pair.com?node_id=446762

perlknight has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks, I need to replace a line in a file when a regex is match. e.g:
host-abc:/var/log/messages:::read_intr;I/O error;AddrMarkNotFound;Data +Request Error:
when there is "host-abc" and "messages" in the line replace the whole line. Thanks.