Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 pondering the Monastery: (2)
As of 2023-09-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?