#!/usr/bin/perl -w use Getopt::Long; $myOpt=0; GetOptions('S=i'=> \$myOpt); print"$myOpt\n";
The file name is tst.pl
When I run this command:
./tst.pl -s 4
I get this result
4
However, when I run the same command without space between option and its value:
./tst.pl -s4
I get this error:
Unknown option: s4
I looked into Getopt::Long and saw that this form of option should be supported.
Any idea?
In reply to GetOptions option with value and no space by kopolov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |