in reply to No arguments or filenames
use strict; (my $cmd = $0) =~ s|^.*/||; # Program name # ---------------------------------------- # Handle Command Line options use Getopt::Std; &getopts ('d:r:H'); my $DATE; # $opt_d my $RCFILE; # $opt_r # -------------------- # Date if ($Getopt::Std::opt_d) { $DATE = $Getopt::Std::opt_d; } else { $DATE = "TODAY"; } # -------------------- # Resource File if ($Getopt::Std::opt_r) { $RCFILE = $Getopt::Std::opt_r; } elsif ( defined($ENV{RCFILE}) ) { $RCFILE = "$ENV{RCFILE}"; } else { warn "ERROR: No RC File Specified\n"; $Getopt::Std::opt_H = 1; } # -------------------- # Help if ($Getopt::Std::opt_H) { warn "$cmd:\n"; warn " (-m) <milestone>\n"; warn " (-r) <rcfile>\n"; warn " (-H) <Help>\n"; exit 1; }
|
|---|