in reply to Arrays and GetOpt::Long
If you pass GetOptions an array ref for one of the values, it will populate it as such.
So you have to call you program like this: program.pl --thing a --thing b --thing c.
Your script will look something like this:
#!/usr/bin/perl -w use strict; use Getopt::Long; GetOptions( 'thing=s' => \my @things, ); print join("\n", @things), "\n";
|
|---|