while () { unless (m/toto/) { s/foo/bar/g; } print; }