my %runmodes = ( config_item => 'regular', action1 => { subroutine => sub{ print "action = 1" }}, action2 => { subroutine => sub{ print "action = 2" }}, action3 => { config_item => 'special', subroutine => sub{ print "action = 3" }}, }, );