Perl Programming Page 5 - Processing Command Line Options with PERL |
In addition to setting Booleans, Getopt::Long.pm also supports processing string and numeric command-line arguments entered by the user. To illustrate how this works, consider the following simple example:
Here's the output:
Here, the "i" data type specifier tells Getopy::Long.pm to expect an integer value after the option name. You can also use "s" for strings, as in the following example:
Here's the output:
blog comments powered by Disqus |