#!/usr/bin/perl -i.bak -wp c:/test.txt print "newline\n" if m/somecond/; s/this/that/;