$ uname -a MINGW64_NT-6.1 w72-station 2.4.0(0.292/5/3) 2015-12-12 15:39 x86_64 Msys #### LINE: while (my $line = <$input_fh>) { chomp $line; #print '.'; if ($line =~ m{(.+)\$Id:.+v.*(\d+\.\d+\.\d+)-(\d+).*\$}xms) { my $string_to_print = "Found version line: '$line'.\n"; $string_to_print =~ s{[^[:ascii:]]}{}g; print $string_to_print; my $preamble = $1; my $current_version = $2; my $new_build_number = $3; $new_build_number++; my $date = serial_stamp({without_seconds => 1}); my ($sec,$mins,$hours,@rest) = localtime(time); my $time = sprintf "%02d:%02d", $hours, $mins; my $new_line = "$preamble\$Id: $file, v $current_version-${new_build_number} $date $time dbotham Exp \$;"; print "Orig Version: '$line'.\n"; STDOUT->autoflush(1); print "New Version: '$new_line'.\n"; STDOUT->autoflush(1); print $output_fh "$new_line\r\n"; next LINE; } print $output_fh "$line\n"; } #### $ git commit -m "Updated line endings git-push-all-remotes.pl." '.und version line: 'Readonly my $ID => q$Id: git-push-all-remotes.pl, v 0.2.11-002495 20160114 13:35 dbotham Exp $; '.ig Version: 'Readonly my $ID => q$Id: git-push-all-remotes.pl, v 0.2.11-002495 20160114 13:35 dbotham Exp $; New Version: 'Readonly my $ID => q$Id: git-push-all-remotes.pl, v 0.2.11-002496 20160114 13:57 dbotham Exp $;'. Done. Adding updated file, 'git-push-all-remotes.pl', back for commit. Updated build numbers in 1 files. [master f444ca1] Updated line endings git-push-all-remotes.pl. 1 file changed, 1 insertion(+), 5 deletions(-)