Thanks Brandon, YAML should get some functions to manipulate it.. On Thu, Mar 3, 2011 at 7:56 PM, Brandon McCaig <[email protected]> wrote: > On Thu, Mar 3, 2011 at 6:39 PM, Brandon McCaig <[email protected]> wrote: >> I don't know if I'd call it easier. I'm not personally familiar with >> YAML so I only bothered to parse the example that you gave. > > Actually looking into YAML it seems much more complicated than this so > unless you know for sure that the input complexity is simple (and have > a good technical reason to manually parse it), I would encourage you > to use a module instead. That said, it seems non-trivial to determine > how to invert the keys on an undetermined data structure, so it might > be too much to ask to write this program with an arbitrary YAML > structure without defining the exact requirements (and justification). > > (As a side note, I erroneously removed indentation from the source > data in my sample program when I pasted it into Vim, but the program > will work even with the indentation) > > > -- > Brandon McCaig <http://www.bamccaig.com/> <[email protected]> > V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. > Castopulence Software <http://www.castopulence.org/> > <[email protected]> >
-- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
