in reply to {,} in GetOptions produces error

Aside from all the other errors, it sounds like the version of Getopt::Long you have installed doesn't support s{,}, a rather new addition.

Replies are listed 'Best First'.
Re^2: {,} in GetOptions produces error
by Tux (Canon) on Apr 01, 2011 at 07:59 UTC

    It was added in version 2.35, released on 28-Apr-2005:

    Changes in version 2.35 ----------------------- : * Options can take multiple values at once. E.g., --coordinates 52.2 16.4 --rgbcolor 255 255 149 To handle the above command line, the following call to GetOptions can be used: GetOptions('coordinates=f{2}' => \@coor, 'rgbcolor=i{3}' => \@colo +r); You can specify the minimum and maximum number of values desired. The syntax for this is similar to that of regular expression patterns: { min , max }.

    I wasn't even considering people using that old a version. You're probably right.


    Enjoy, Have FUN! H.Merijn