Skip to content

Instantly share code, notes, and snippets.

View earnhardt3rd's full-sized avatar

frank.earnhardt earnhardt3rd

View GitHub Profile
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromARRAY_SINGLE_W_TITLE();}
1;
sub fromARRAY_SINGLE_W_TITLE {
my @ARRAY_S = @_;
my $single;
if (scalar(@ARRAY_S) <= 1) {return;}
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromARRAY_WITH_DEFAULT();}
1;
sub fromARRAY_WITH_DEFAULT {
my $input = shift || "s";
print " =============== FROM ARRAY ===============\n" if $DEBUG > 0;
my @ARRAY = @_;
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromHASH();}
1;
sub fromHASH {
print " =============== FROM HASH ===============\n" if $DEBUG > 0;
my %H = @_;
my %RTN;
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromHASHKeys2RRAAY();}
1;
sub fromHASHKeys2RRAAY {
print " =============== FROM HASH KEY 2 ARRAY===============\n" if $DEBUG > 0;
my %H = @_;
my %RTN;
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromHASH_SINGLE();}
1;
sub fromHASH_SINGLE {
print " =============== FROM HASH ===============\n" if $DEBUG > 0;
my %H = @_;
my %RTN;
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &getATT();}
1;
sub getATT {
my $a = shift || "";
my $v = shift || "";
my $s = shift || "";
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &ADD_2_PATH();}
1;
sub ADD_2_PATH {
my $ADD_PATH_STR = shift || "";
if ($ADD_PATH_STR eq "") {return;}
if (! -d $ADD_PATH_STR) {
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &Ask();}
1;
sub Ask {
###########################################################################
#REMS# Ask(Question,Answer1,Answer2,Answer3,etc...)
#REMS# Return: User Selected Answer
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &buildManualUnixFiles();}
1;
sub buildManualUnixFiles {
my $line = $_[0];
$line =~ s/\\/\//g;
print " U:$line\n" if $DEBUG > 0;
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &buildManualWinFiles();}
1;
sub buildManualWinFiles {
my $line = $_[0];
print " W:$line\n" if $DEBUG > 0;
my $to = $line;