M
Mike Jackson
Hi,
I would like to convert this block of text:
(app "webserver"
(ip "1.2.3.4")
(name "foo")
(host "somehost")
)
to this:
app.webserver.ip="1.2.3.4";
app.webserver.name="foo";
app.webserver.host="somehost";
and skip processing of the entire block if the top level contains a
"no", for example:
(some_condition "no"
(foo "")
(bar "")
)
Is there already some method of doing this in perl, or is this a regex
job? Any advice?
Thanks,
Mike
I would like to convert this block of text:
(app "webserver"
(ip "1.2.3.4")
(name "foo")
(host "somehost")
)
to this:
app.webserver.ip="1.2.3.4";
app.webserver.name="foo";
app.webserver.host="somehost";
and skip processing of the entire block if the top level contains a
"no", for example:
(some_condition "no"
(foo "")
(bar "")
)
Is there already some method of doing this in perl, or is this a regex
job? Any advice?
Thanks,
Mike