If you're not completely locked in to your input parameters,
Getopt::Long may be useful to you.
use strict;
use warnings;
use Getopt::Long;
my %opts;
GetOptions(
'address=s' => sub { $opts{$_[0]} = $_[1]; }
'user=s' => sub { $opts{$_[0]} = $_[1]; }
'pass=s' => sub { $opts{$_[0]} = $_[1]; }
'protocol=s' => sub { $opts{$_[0]} = $_[1]; }
'snmp_community=s' => sub { $opts{$_[0]} = $_[1]; }
'snmp_port=s' => sub { $opts{$_[0]} = $_[1]; }
'snmp_timeout=s' => sub { $opts{$_[0]} = $_[1]; }
...
}
Getopt::Long can be set to carp/croak when your script doesn't have all the required items, which may come in handy as well.