FAQ
On 11/15/11 Tue Nov 15, 2011 8:10 AM, "Stefan Wiederoder"
<stefanwiederoder@googlemail.com> scribbled:
Hello list,

I´m using a json config file to read a file with server group
definitions, including group of groups like
this example:

[jdoe@belbo]# cat groups.json
{
"G_Group_PR" : [ "serverA", "serverB" ],
"G_Group_QS" : [ "serverC", "serverD" ],
"G_All" : [ "G_Group_PR", "G_Group_QS" ]
}

now I need to resolve all groups to their member servers to map
actions to them.

this is where I´m stuck with an elegant solution, how can I
effectively parse this hash to
replace all Groups (always starting with G_)?
I don't know json, but have you looked on CPAN?

<http://search.cpan.org/search?query=json&mode=all> results in a lot of
potentially helpful modules, such as JSON.pm and JSON::Parse.pm. The latter
looks particularly spot on for your purpose.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
groupbeginners @
categoriesperl
postedNov 15, '11 at 4:11p
activeNov 17, '11 at 9:09p
posts6
users5
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase