Hi,
First, thanks to all the gurus who've been so helpful to me in the past.
Here's a new one... I have a script that creates a report of error codes
from the access log. There are about a dozen different codes that are
meaningful to us. I want to find a way to allow the user to run the script
from the command line (as now) with an additional parameter - the 3-letter
code that will create the appropriate report. When entered, this three
letter code, call it TZE, will replace the existing three-letter code from
the last time the script was run. There are about a dozen places that it
needs to replace and they vary in case (lower, upper, and mixed). Here is a
snippet. The occurances of CIT, Cit, and cit need to be replaced. Thanks
again in advace!
#!/tools/perl/bin/perl
use Getopt::Std;
$CITerr=0;
$cit = "";
%userCit = ();
$countCit=0;
if ($ARGV[0] eq "") {
usage();
exit(0);
}
else {
getArgs();
#---------------------------------
# body of script
#---------------------------------
sub usage {
$whatsWrong = shift(@_);
print STDERR "\n$whatsWrong\n";
print STDERR "citFail.pl [-p port] -d day -m month -y year\n";
print STDERR " -p optiontal: specify port number -- if not specified,
80 will be used\n";
print STDERR " -d specify numberic day of month -- e.g. 3\n";
print STDERR " -m specify numberic month -- e.g. 4\n";
print STDERR " -y specify 4-digit year\n";
}
--
-Larry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]