Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save earnhardt3rd/ef5d5cfc0e7ea620412296e0e7eaadf5 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 = &_STRING_2_PATH();}
1;
sub _STRING_2_PATH {
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::
#::: CONVERT SPECIAL PATH STRING TO REAL PATH :::
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::
my $input = shift;
my $S_SEP = shift || $PIT;
print " _STRING_2_PATH($input)\n" if $DEBUG > 0;
if ($input =~ /,/) {
$S_SEP=$input;
$S_SEP=~ s/.*,//;
$input=~s/,.*//g;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment