My humble apologies for wasting your time. How silly of me not to see that the answer was contained in my own question! I of course didn't mean the message was nonsense. I meant the nonsense was in my behavior. I foolishly thought there might be some list of examples like the
Perl data structures cookbook, but for YAML, that my poor searching abilities hadn't uncovered. And that next time someone searched for YAML in this site, they'd be happy to find this node. I'll do penance for my presumption.
I'm sorry I wasn't more specific. My original, very trivial problem was to have a list of days, with for each day a team of people, and a head of a team.
By trial and error, I found this:
days:
-
date: 2005-06-01
team:
- Jack
- Jill
- Joe
boss: Clara
-
date: 2005-06-02
team:
- Harry
- Hillary
- Howie
boss: Victoria
It does the trick, producing an array of hashes of arrays.
Now (does my greed know no bounds?) I'm wondering if there's a more concise way, so that team members could be on the same line. At the same time I feel shame to even mention it, because I'm sure the answer is in the fine documentation, and it's just my poor eyes that don't see it! But perhaps wisdom can be achieved through shame.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.