- 论坛徽章:
- 0
|
Options with multiple values
Options sometimes take several values. For example, a program could use
multiple directories to search for library files:
--library lib/stdlib --library lib/extlib
To accomplish this behaviour, simply specify an array reference as the
destination for the option:
GetOptions ("library=s" => \@libfiles);
Alternatively, you can specify that the option can have multiple values
by adding a "@", and pass a scalar reference as the destination:
GetOptions ("library=s@" => \$libfiles); |
|