Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: GetOptions non-option callback

by jimbojones (Friar)
on Feb 24, 2005 at 21:12 UTC ( #434260=note: print w/ replies, xml ) Need Help??


in reply to GetOptions non-option callback

Hi

I ran your code with the permute option and it worked for me. Can you post your command line call?

use Getopt::Long; Getopt::Long::Configure("permute"); my $export = 0; my $exportfile = ""; GetOptions( "convert" => \$convert, "export" => \$export, "exportfile=s" => \$exportfile, "<>" => \&badarg, ); sub badarg { my $badparm = $_[0]; print"badarg $badparm\n"; } __DATA__ >get_opt.pl --convert --export --exportfile temp.txt blah blah badarg blah badarg blah
this was under both AS 5.6.1 and 5.8.4

- j


Comment on Re: GetOptions non-option callback
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2015-07-05 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls