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

Re: How to find what options are used for Getopt::Long

by toolic (Bishop)
on Aug 03, 2012 at 12:17 UTC ( #985223=note: print w/replies, xml ) Need Help??


in reply to How to find what options are used for Getopt::Long

Another way is to store all your opt in a hash instead of individual scalars:
use warnings; use strict; use Getopt::Long; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %opt; GetOptions(\%opt, qw( help cfg=s verbose silent dir=s )) or die "Mandatory options not supplied\n"; print Dumper(\%opt); __END__ script.pl -h -v $VAR1 = { 'help' => 1, 'verbose' => 1 };

Replies are listed 'Best First'.
Re^2: How to find what options are used for Getopt::Long
by doubledecker (Scribe) on Aug 07, 2012 at 11:02 UTC

    Works for me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985223]
help
Chatterbox?
[choroba]: thank you
Discipulus or was mine?!?
[beech]: thank you, it sure is pretty "code", yup, thats what I call it my ...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-02-28 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (398 votes). Check out past polls.