Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (23 sloc) 0.472 kb
#!/usr/bin/perl -w
use strict;
use warnings;
use Config;
use File::Copy;
my $old = 'Makefile';
my $new = 'Makefile.new';
open OLD, "<", $old or die "Unable to open $old: $!\n";
open NEW, ">", $new or die "Unable to open $new: $!\n";
my $flag;
while (<OLD>) {
if ($flag) {
print NEW;
next;
} elsif (/^PERL\s*=\s*/) {
print NEW "PERL = $Config{perlpath}\n";
} else {
print NEW;
}
}
close OLD;
close NEW;
move $new, $old;
Jump to Line
Something went wrong with that request. Please try again.