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

RE: creating custom switches in my program?

Thread Previous
From:
Bill Akins
Date:
March 5, 2002 19:56
Subject:
RE: creating custom switches in my program?
Message ID:
FKENKAKKCMCGADDDJJDEOEFKCKAA.fax@4dnsinc.com
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...

HTH!

Bill A.

-----Original Message-----
From: M z [mailto:kpslater777@yahoo.com]
Sent: Tuesday, March 05, 2002 10:26 AM
To: beginners@perl.org
Subject: creating custom switches in my program?


Hello

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!
http://mail.yahoo.com/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About