home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!gatech!darwin.sura.net!uvaarpa!mmdf
- From: "G.W.Bultman" <bultman@dgw.rws.nl>
- Subject: NGetOpt interface - how to use it
- Message-ID: <1992Nov9.132945.2010@uvaarpa.Virginia.EDU>
- Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
- Reply-To: bultman@dgw.rws.nl
- Organization: The Internet
- Date: Mon, 9 Nov 1992 13:29:45 GMT
- Lines: 29
-
- Hi,
-
- I'd like to use the NGetOpt interface, but I'm not sure how to
- check if an option is set or not.
-
- Can anyone help?
-
-
- | #!/usr/local/bin/perl
- | require "newgetopt.pl";
- | do NGetOpt('gridsize=f','intervals=i','expparts=i');
- |
- | if ( option -gridsize is set )
- | {
- | $gridsize = $opt_gridsize;
- | }
- | else
- | {
- | $gridsize = default value;
- | }
-
- --
-
- o o
- / | \ Gert Bultman <bultman@dgw.rws.nl> Koningskade 4 / | \
- o--o--o Tidal Waters Division 2596 AA The Hague o--o--o
- \ | / Rijkswaterstaat The Netherlands \ | /
- o o
-
-