Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: CLI with ARGV

by dasgar (Curate)
on Aug 08, 2012 at 06:14 UTC ( #986156=note: print w/ replies, xml ) Need Help??


in reply to CLI with ARGV

Perhaps I missed it, but I didn't see a question in your post.

I'm guessing that you're wanting help with command line arguments. If so, you should check out Getopt::Long, which is a core module for Perl.


Comment on Re: CLI with ARGV
Replies are listed 'Best First'.
Re^2: CLI with ARGV
by WhiskeyJack (Initiate) on Aug 08, 2012 at 06:52 UTC
    I'm sorry if I wasn't clear. My question was how I would go about creating a variable for instance $host that is defined by the user in the command line argument. So that the $host that was defined by the user would be used later in the program as a host in the ssh2 connection. "program.pl -host 10.1.1.1" and now this ip would be the $host variable used with the ssh2 connection in the code.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-31 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls