The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl -w
use File::Spec;
use strict;

my $dir = shift or die qq[No source directory provided!\n];
my $new = File::Spec->catdir( $dir, 'Makefile' );
my $cmd = "$^X -pi.bak -e's/-lz/libz.a/' $new";

system($cmd) and die qq[Could not patch Makefile\n];					

print "Makefile patched succesfully\n";