Solved

Perl switches

Posted on 2014-12-14
3
220 Views
Last Modified: 2014-12-14
Hello,
I would like to call a perl program and pass to it arguments in the form of:
program_name.pl --domain adcd_domain --port 7765 -- etc.
I am not sure how it is called and what should I look for.
I would like to see a simple example how it is being done,

Thanks,
Tamir
0
Comment
Question by:tamirmilo
3 Comments
 
LVL 28

Accepted Solution

by:
FishMonger earned 250 total points
ID: 40498966
That is accomplished with the use of the Getopt::Long module.
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 250 total points
ID: 40498967
See the examples in
perldoc Getopt::Long
0
 

Author Closing Comment

by:tamirmilo
ID: 40499064
Thank you.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question