use strict; use warnings; my $filename = 'myinfo.txt'; # Create the test file open my $outFile, '>', $filename or die "Failed to create $filename: $!"; print $outFile <) { next if /^Phone:/; s/^Author:.*/Author: Johny5/; print; } #### Program name: some junk Author: Johny5 Company: no name Version: 1.0