in reply to Approach to remove brackets from config
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Approach to remove brackets from config
by psini (Deacon) on Aug 20, 2008 at 21:32 UTC | |
by samtregar (Abbot) on Aug 21, 2008 at 16:07 UTC |