example2-file1 Tue Apr 25 11:25:05 2000 example2-file2 Tue Apr 25 11:25:14 2000
  
 use Getopt::Std; use Getopt::Std;
  
 # 
 # You must use a version of diff that has unified output.  GNU diff has this 
 # option, so you can leave the default setting as is on Linux based systems. 
 # For most other Unix systems, grab a copy of GNU diff from  
 # ftp://ftp.gnu.org/gnu/diffutils 
 # 
 $diff='/usr/bin/diff'; $diff='/usr/bin/diff';
  
 # #
 # Colors and font to show the diff type of code changes # Colors and font to show the diff type of code changes
 # #
 $diffcolorHeading='#99CCCC';        # color of 'Line'-heading of each diffed file $diffcolorHeading='#99BBBB';        # color of 'Line'-heading of each diffed file
 $diffcolorEmpty='#CCCCCC';        # color of 'empty' lines $diffcolorEmpty='#CCCCCC';        # color of 'empty' lines
 $diffcolorAdd='#FF9999';        # Removed line(s) (left)  (  -  ) $diffcolorAdd='#FF9999';        # Removed line(s) (left)  (  -  )
 $diffcolorChange='#99FF99';        # Changed line(s) (     both    ) $diffcolorChange='#99FF99';        # Changed line(s) (     both    )
 # END OF CONFIGURABLE OPTIONS # END OF CONFIGURABLE OPTIONS
 #----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
  
  # MAIN BODY
 # #
 # Process options # Process options
 # #
 getopts('h:f'); getopts('h:f');
  
 die "Usage: $0 [-f <html footer>] [-h <html header>] [file1] [file2]\n" if (scalar @ARGV != 2); die "Usage: $0 [-f <footer>] [-h <header>] [file1] [file2]\n" if (scalar @ARGV != 2);
 $File1=$ARGV[0]; $File1=$ARGV[0];
 $File2=$ARGV[1]; $File2=$ARGV[1];
  
  
 HtmlFooter(); HtmlFooter();
  
 exit 0; 
  
 #-------------------------------------------------------------------------- #--------------------------------------------------------------------------
 sub htmlify { sub htmlify {
         local($string, $pr) = @_;         local($string, $pr) = @_;
       close(HEADER);       close(HEADER);
   }   }
   else {   else {
       print qq(<HTML>\n<HEAD>\n);       print "<HTML>\n<HEAD>\n";
       print qq(<TITLE>hdiff Output</TITLE></HEAD>\n);       print "<TITLE>hdiff Output</TITLE></HEAD>\n";
       print qq(<BODY BGCOLOR="#EEEEEE">\n);       print  "<BODY BGCOLOR=\"#EEEEEE\">\n";
       print qq(<CENTER><FONT FACE=Arial SIZE=5>hdiff output</FONT></CENTER><P>\n);       print "<CENTER><H1>hdiff output</H1></CENTER>\n";
   }   }
  
   print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";   print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
       return;       return;
   }   }
   else {   else {
       print "</body></html>\n";       print "</BODY></HTML>\n";
   }   }
 } }
  


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0


Customised footer