Hello Caroline -

I have attached a perl script that uses

use Getopt::Long;
use Pod::Usage;

It's sort of involved, but the first few
pages show a working getopt. The Pod::Usage
function can tie usage/help/man functions
to the pod docs at the end of the
script (of course, in this sample script -
now history - the pod is not complete.)

Check thes modules out on CPAN - they both
have good documentation.

Aloha => Beau.

-----Original Message-----
From: Caroline Allen [mailto:callen@;wbfa.com]
Sent: Friday, October 25, 2002 4:34 PM
To: [EMAIL PROTECTED]
Subject: using getopt()


Hi, my name is Caroline Allen, and I'm a fairly long-time C programmer, 
predominantly in the field of visual effects (you know, like, hacking 
for movies). I have recently started using Perl, and I think it's 
_great_, though getting up to speed with it is a bit like when I started 
learning Spanish long after being fluent in French -- Perl has so many 
similarities to C  and <n>shell that I trip over the differences. Things 
only get more confused because I'm also a Lisp programmer, and a lot of 
the dynamic/lexical scoping issues are very familiar to me, not to 
mention the automatic memory management. Oh gosh, then there's Basic and 
its own way of string handling (I was doing a lot of work in VB). As one 
of my clients, Daffy Duck, would say, "Mother!"

I would really like to be using "getopt," and I'm failing. I can't 
submit examples of my code to this list, for facility security reasons, 
but if anyone could post some sample code using "getopt", or direct me 
_to_ some sample code, that would be great. I browsed CPAN but didn't 
find anything to the purpose, and I get the feeling that The Camel book 
doesn't really address this very much, at least as far as I can find. I 
would like to be using "getopt" because it models the behavior my client 
base is accustomed to, i.e.  switch-based, non-positional arguments on 
the UNIX command line.

I can't help wondering: does the Perl community have the same distaste 
for non-positional arguments as the Lisp community seems to have?

Thanks in advance,
Working on a Friday night, waiting for the hellish traffic to subside,
Caro


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: bcm
Description: Binary data

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to