Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How to process Getopt::Long from STDIN

by m_jaser (Novice)
on Mar 12, 2017 at 03:20 UTC ( [id://1184312]=note: print w/replies, xml ) Need Help??


in reply to Re: How to process Getopt::Long from STDIN
in thread How to process Getopt::Long from STDIN

Thanks for your quick response...! Here's what the first part of the code looks like:

my ( $Carrier_Option, $printHelp, $version, $Nr_of_TP, $is_BS, $my_legend, $curr_dir, ); GetOptions( "c|C|carriers=s"=>\$Carrier_Option, #string "t|T|TP=i"=>\$Nr_of_TP, #numeric "h|H|Help"=>\$printHelp, #boolean "v|V|Version"=>\$version, #boolean "b|B|BS|bs|Bs"=>\$is_BS, #boolean "l|l|legend=s"=>\$my_legend, #string "a|A|altitude=i"=>\$BS_RadioHeight, "d|D|Directory=s"=>\$curr_dir, );

I run the script at first as follows:

perl Analyzer.pl -t 2 -c "4 1 2 3 4"

If the options are not entered, then default settings are considered in the script's execution, and the active directory is taken from the current local working directory. The second part of the script (which is where i need the help) is still not complete, but my plan is to have something as follows:

print "To process another log file, enter the path to the log file alo +ng with the options, or enter 'x' to exit: "; my $New_User_Input=<STDIN>; chomp $New_User_Input; my $new_options=GetOptionsFromString($New_User_Input);

I'm not sure how this works with GetOptionsFromString perhaps?? or some other method?

I hope this makes it a little clearer to what I intend to do.

Thanks...!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184312]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found