CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
How does this work ---> $



Sep 5, 2000, 5:58 AM

Post #1 of 2 (2167 views)
How does this work ---> $ Can't Post

Here it is in context.

# Let newgetopt handle the command line options

require '';

# Set the target directory to the one specified in the command line.

$directory = $opt_i;


Enthusiast / Moderator

Sep 5, 2000, 7:54 AM

Post #2 of 2 (2167 views)
Re: How does this work ---> $ [In reply to] Can't Post

You STILL HAVE NOT SHOWN US the code to However, I can tell you how I believe it works.

NGetOpt() gets a list of strings, such as "X=Y", where X is the name of the option, and Y is the type of value the option gets. 's' is probably "scalar". When you do

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

# program called as: myprog -foo Jeff
$ok = NGetOpt("foo=s");

NGetOpt() creates the variable $opt_foo, and gives it the value 'Jeff'.

I can't tell you any more than that.

Why don't you read the documentation for the file?

Jeff "japhy" Pinyan -- accomplished author, consultant, hacker, and teacher


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives