#!/usr/bin/perl -sw use strict; use warnings; use Getopt::Long; my $remote = 0; my $test = 0; GetOptions ('remote' => \$remote, 'test' => \$test); print "$remote:$test\n";
perl test.pl --remote --test
The above columns are "0: 0". I am new to Perl, so I have not been able to determine why this is not working.
I also launched the "Simple Options" section from http://perldoc.perl.org/Getopt/Long.html#Simple-options and did nothing.
I believe that the command line option -sthat you include in your line is biting you. According to the perlrun documentation , the command line parameter is -s:
-s
, ( -).
, , . -w, use warnings ( use warnings , -w).
-w
use warnings
, , :
#!/usr/bin/perl