Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: script fails but succeeds in debugger

by codeacrobat (Chaplain)
on Dec 20, 2010 at 11:39 UTC ( #877988=note: print w/replies, xml ) Need Help??


in reply to script fails but succeeds in debugger

use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( 'my-program %o <some-arg>', [ 'server|s=s', "the server to connect to" ], [ 'port|p=i', "the port to connect to", { default => 79 } ], [], [ 'verbose|v', "print extra stuff" ], [ 'help', "print usage message and exit" ], ); print($usage->text), exit if $opt->help;

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Replies are listed 'Best First'.
Re^2: script fails but succeeds in debugger
by Anonymous Monk on Dec 20, 2010 at 12:00 UTC
    It works here:
    [~] perl -v | grep built This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int [~] perl -MGetopt::Long::Descriptive -E'say$Getopt::Long::Descriptive: +:VERSION' 0.087 [~] perl -MParams::Validate -E'say$Params::Validate::VERSION' 0.95 [~] perl -c 877988.pl 877988.pl syntax OK [~] perl 877988.pl [~] perl 877988.pl --help my-program [-psv] [long options...] <some-arg> -s --server the server to connect to -p --port the port to connect to -v --verbose print extra stuff --help print usage message and exit [~]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-09-22 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?