sub db_update { my $dpoR = shift; # get hash ref my $host = $dpoR->{'host'}; my $user = $dpoR->{'user'}; # ... }