Skip to content

Instantly share code, notes, and snippets.

@earnhardt3rd
Created June 19, 2023 14:03
Show Gist options
  • Select an option

  • Save earnhardt3rd/ed0b71881c7f9336ef5263b390fd988d to your computer and use it in GitHub Desktop.

Select an option

Save earnhardt3rd/ed0b71881c7f9336ef5263b390fd988d to your computer and use it in GitHub Desktop.
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &_SERVERS();}
1;
sub _SERVERS {
my $input = shift || "";
print " _SERVERS($input)\n" if $DEBUG > 0;
if (uc($input) eq "NOW") {$input = &getDate() . "-" . &getTime();}
if (uc($input) eq "DT") {$input = &getDate();}
if (uc($input) eq "TM") {$input = &getTime();}
my $INTERNAL="";
if (uc($input) =~ /INT:/) {
print " INTERNAL\n";
$INTERNAL="TRUE";
$input =~ s/^INT://g;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment