my %command_list = ( 'update' => { args => 2, function => *refresh_list, }, ); my $input=$ARGV[0] &{ $command_list{$input}{'function'} }