in reply to Managing Configuration Differences & Perl

I have faced about the same problem. I use hashes that look like this...

$inf = { test => { host1 => { app => { setting1 => 'foo', setting2 => 'bar', }, }, host2 => { app => { setting1 => 'baz', setting2 => 'buz', }, }, }, dev => { host3 => { app => { setting1 => 'a', setting2 => 'b', }, }, host4 => { app => { setting1 => 'c', setting2 => 'd', }, }, }, };

My perl scripts typically end up rewriting configuration files based on environment/host, using the hash to drive the rewrites. I take this approach because I use a system like this to configure large numbers of COTS products along with proprietary software for a large number of environments and hosts.