I would code it in two steps. First, write a parser which parses your (bizarre) config format into a Perl data structure. For you example you might attempt to produce something like:
my %data = (
server => {
"hostname" => "test".
"console-type" => {
"type" => "vt100",
},
"account root" => {
"authentication-type" => {
"password" => q{"bubba"}
}
}
);
Second, write some Perl code that takes your parsed data-structure and outputs the CLI commands. Neither step is completely trivial, but they shouldn't be too hard for a competent programmer. If it were my job I think I'd do the first step with Parse::RecDescent, but if you've never used it before it's probably more trouble than it's worth. Give it a try and post again if you run into trouble.
-sam