develooper Front page | perl.beginners | Postings from March 2002

RE: creating custom switches in my program?

Thread Previous
Bill Akins
March 5, 2002 19:56
RE: creating custom switches in my program?
Message ID:
I have found this testing harness to be very helpful.  Perhaps this will
help you understand options better than just a snippet as this incorprates
many options...


Bill A.

-----Original Message-----
From: M z []
Sent: Tuesday, March 05, 2002 10:26 AM
Subject: creating custom switches in my program?


I was looking into documentation on the getopts
module, but was having some difficulty understanding
how to implement it.

The scope of my problem is quite simple, actually.
can someone help me create a snippet where if no
argument is specified at the command line, than the
output is written out to the input file, and if an
option is given (say -d) at the comment line, the
program subsequently prompts the user for the
destination to write to?

thanks, I think this is easier than I'm making it out
to be, but I have no experience implementing the
getopts module.

Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About