Thanks Brandon, YAML should get some functions to manipulate it.. On Thu, Mar 3, 2011 at 7:56 PM, Brandon McCaig <bamcc...@gmail.com> wrote: > On Thu, Mar 3, 2011 at 6:39 PM, Brandon McCaig <bamcc...@gmail.com> 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/> <bamcc...@gmail.com> > V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. > Castopulence Software <http://www.castopulence.org/> > <bamcc...@castopulence.org> >
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/