#!/usr/local/bin/perl -w # make_diff v. 17 Mar 1996, Dave Schweisguth # Bugs: # Hardcoded paths ### Preliminaries require 5.002; # Perl 5.002 required use strict; # Require optional-but-desirable practices ### Parameters # Environment (my $whatami = $0) =~ s|.*/||; # `basename $0` chop(my $date = `date '+%d %b %Y %T %Z'`); # RFC822, dd Mon yy hh:mm:ss ZON # Configuration my $rawdir = 'raw'; my $olddir = 'raw.old'; my @faqs = qw(admin apps audio graphics hardware impressario inventor misc movie performer pointer security); my $diff = '/usr/bin/diff'; # Initialization (don't change these) my($i, @diff); ### Arguments and error-checking # Parse args my($arg, $sign, $first, $rest); while (@ARGV and ($sign, $first, $rest) = ($ARGV[0] =~ /^([\-+])(.)(.*)/)) { if ($sign eq '+' && $first !~ /[\0]/) { # -/+ switches (none at the moment) &usage("$whatami: $sign$first is not an option.\n"); } if ($first =~ /[\0]/) { # Switches with arguments (none at the moment) shift; $arg = $rest ne '' ? $rest : @ARGV ? shift : &usage("$whatami: $sign$first requires an argument.\n"); } elsif ($rest eq '') { shift; } else { $ARGV[0] = "$sign$rest"; } if ($first eq 'u') { &usage(0); } else { &usage("$whatami: $sign$first is not an option.\n"); } } sub usage { my($message) = $_[0]; warn $message if $message; warn <