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 [~]