Created
June 19, 2023 13:56
-
-
Save earnhardt3rd/bef105cc7e039bbcdb4e51a9a64326eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| #REMS# Examples: | |
| #REMS# &Ask("Are you sure you want to UnCheckOut with Differences?","No","Yes"); | |
| #REMS# &Ask("Please select a Status:","UnAssigned","Pending","WIP","Complete"); | |
| print " DEBUG:_Common::Ask {\n" if $DEBUG > 10; | |
| my $question = shift; | |
| print " Question:$question\n" if $DEBUG > 10; | |
| if ($question eq "") {return;} | |
| my $ans=""; | |
| my $ret_val; | |
| my %valid; | |
| for (my $i=0;$i<=scalar(@_)-1 ;$i++) { | |
| print " --$i $_[$i]\n" if $DEBUG > 10; | |
| $valid{lc($_[$i])} = $i; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment