use strict; use warnings; use Getopt::Long; my $key; my $value; my %options; GetOptions (\%options, 'names:s@', 'address:s@'); while (($key, $value) = each %options) { print "$key = @$value\n"; }