Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Trickery with Getopt::Long (flag option, with optional integer arg)

by toolic (Bishop)
on Aug 18, 2017 at 15:12 UTC ( [id://1197614]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my $arg = -1;
    GetOptions('arg:i' => \$arg) or die;
    print "$arg\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found