in reply to Convert Tcl Keyed List to Perl
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert Tcl Keyed List to Perl
by LanX (Saint) on May 22, 2013 at 16:56 UTC | |
|
Re^2: Convert Tcl Keyed List to Perl
by jaredor (Priest) on May 24, 2013 at 02:30 UTC | |
by LanX (Saint) on May 24, 2013 at 03:38 UTC |