use Config::Tiny; my $conf = Config::Tiny->read('your_config'); my $debug = $conf->{_}->{debug}; my $routers = $conf->{routers}; # Hash ref with routers information my $groups = $conf->{groups}; # Hash ref with group information my $router1 = $routers->{router1}; # Router's IP my $group1 = $groups->{group1}; # Array ref with routers list which belong to group 1. . . .