Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Using number "0" as an input argument

by karlgoethebier (Abbot)
on Sep 22, 2015 at 10:15 UTC ( #1142718=note: print w/replies, xml ) Need Help??


in reply to Using number "0" as an input argument

I guess you want something like this:

#!/usr/bin/env perl use strict; use warnings; use Getopt::Long; use Pod::Usage; use Data::Dump; my %options; # Getopt::Long::Configure("no_ignore_case"); # perhaps you need it... GetOptions( \%options, "device=i" ); pod2usage( -exitstatus => 0, -verbose => 2 ) unless defined $options{d +evice}; dd \%options; # stuff... __END__ =pod =head1 USAGE Something went wrong. =cut

Please see also Re: throw a warning if no argument were passed, Re: GetOpt Organization and Getopt::Long

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1142718]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-05-23 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?