Use perl -w.
Use the Debian location of the Perl interpreter.
Install things into the Debian-mandated directories.
Install the config files, binaries, and libraries separately.

--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@
 # You need to change the following line to the full pathname
 # of your perl interpreter
 
-PERLBIN = /usr/local/bin/perl
+PERLBIN = /usr/bin/perl
 
 # and here are a some commands that may be system-dependent
 
@@ -17,7 +17,11 @@
 # The rest should be automatic
 
 CLIENTS = wwwstat wwwerrs monthly splitlog oldlog2new
-LIBS    = domains.pl wwwstat.rc splitlog.rc
+LIBS    = domains.pl
+CONFS   = monthly.rc  oldlog2new.rc  splitlog.rc  wwwerrs.rc  wwwstat.rc
+BINDIR  = $(DESTDIR)/usr/sbin/
+CONFDIR = $(DESTDIR)/etc/wwwstat
+LIBDIR  = $(DESTDIR)/usr/lib/wwwstat
 
 .SUFFIXES:
 .SUFFIXES: .pl $(SUFFIXES)
@@ -26,7 +30,7 @@
 
 .pl:
 	cp $*.pl $*
-	$(PERLBIN) -pi -e 's#YOUR_PERL_BINARY#$(PERLBIN)#o;' $*
+	$(PERLBIN) -pi -e 's#YOUR_PERL_BINARY#$(PERLBIN) -w#o;' $*
 	chmod 755 $*
 
 #
@@ -36,3 +40,8 @@
 clean:
 	$(RM) $(CLIENTS)
 
+install:
+	$(COPY) $(CLIENTS) $(BINDIR)
+	$(COPY) $(CONFS) $(CONFDIR)
+	$(COPY) $(LIBS) $(LIBDIR)
+
