I was so kind to format your data with emacs
$kl_string=<<__KL__ { {Register { {CumulativeActive(calls)(In) 0} {CumulativeSuccessfullyEstablished(calls)(In) 0} {CumulativeSuccessfullyCompleted(calls)(In) 0} {CumulativeUnsuccessful(calls)(In) 0} } } } { { {Make Cal l} { {CumulativeActive(calls)(In) 0} {CumulativeSuccessfullyEstablished(calls)(In) 0} {CumulativeSuccessfullyCompleted(calls)(In) 0} {CumulativeUnsuccessful(calls)(In) 0} } } } { {Initiating { {CumulativeA ctive(calls)(In) 0} {CumulativeSuccessfullyEstablished(calls)(In) 0} {CumulativeSuccessfullyCompleted(calls)(In) 0} {CumulativeUnsuccessful(calls)(In) 0} } } } { {Summary { {CumulativeActive(calls)(In) 0} {CumulativeSuccessfullyEstablished(calls)(In) 0} {CumulativeSuccessfullyCompleted(calls)(In) 0} {CumulativeUnsuccessful(calls)(In) 0} } } } __KL__
and as it turns out it's a mixture of nested lists and keyed lists.¹
What's worse, I can't easily see a way to automatically distinguish between the two ...
(OK it's more than a decade that I used TCL for the last time.)
So w/o deeper information of the schema I'd rather recommend to try to find a JSON interface for TCL.
Cheers Rolf
( addicted to the Perl Programming Language)
¹) I suppose you want a nested data structure with Perl arrays and hashes
In reply to Re: Convert Tcl Keyed List to Perl
by LanX
in thread Convert Tcl Keyed List to Perl
by bkobs39
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |