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

Re: Passing C++ variable into Perl in command line

by spivey49 (Monk)
on Jul 24, 2008 at 18:04 UTC ( #699947=note: print w/replies, xml ) Need Help??


in reply to Passing C++ variable into Perl in command line

You'll need to surround the command line call containing spaces with double qoutes on Windows. Here's an example using Getopt::Long:

use Getopt::Long; GetOptions( "n=s" => \$name, "h=s" => \$host );

Your arguments will both be strings in this example and referenced from the command line as -n and -h. From there you can reference the arguments using $name and $host

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2019-12-08 16:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?