http://qs321.pair.com?node_id=189552


in reply to Re: Passing Options
in thread Passing Options

I would change the \@release into \$release and use : colon or pipe separated values to send multiple arguments without repeating the option. Then simply create your array with a split.
use Getopt::Long; our $realeases; GetOptions( 't=s' => \ our $target, 'b=s' => \ our $buildtype, 'r=s' => \ $releases ); our @releases = split(/\:/,$releases);
Program is called with:
perl script.pl -r 1:2:3 -b blah -t blah