in reply to "Updating" files.

Close.
#!perl use strict; use 5.010; local @ARGV = 'myinfo.txt'; local $^I = '.bak'; while( <> ) { s/^Author:.*/Author: Johny5/; s/^Phone:.*\n//; print; }

And since you're already requiring 5.10 (for no reason), you might as well use \K

#!perl use strict; use 5.010; local @ARGV = 'myinfo.txt'; local $^I = '.bak'; while( <> ) { s/^Author: \K.*/Johny5/; s/^Phone:.*\n//; print; }