Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 browsing the Monastery: (9)
As of 2014-09-22 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (191 votes), past polls