Hi. When I run the following program:

#!/opt/local/bin/perl use strict; use YAML::XS; my %microphones = ( d6 => 'Audix D6', d2 => 'Audix D2', c414 => 'AKG C-414XLS', 4011 => 'Danish Pro Audio (DPA) 4011', 4003 => 'Danish Pro Audio (DPA) 4003', re20 => 'Electro-Voice RE20', km184 => 'Neumann SKM184', mkh20 => 'Sennheiser MKH20', md441 => 'Sennheiser MD441 U', sm57 => 'Shure SM57LC', beta56 => 'Shure Beta 56A', sm81 => 'Shure SM81', ); my %preamplifiers = ( hv3c => "Millennia Media HV-3C", hv3d => "Millennia Media HV-3D", rnp => "FMR Audio Really Nice Preamp RNP8380", 737 => "Avalon Design VT-737SP", ); print Dump(%microphones, %preamplifiers);

I expect to get something like

--- hash-name key: value key: value key: value --- hash-name key: value key: value key: value (etc.)

Instead, I get:

--- sm81 --- Shure SM81 --- d2 --- Audix D2 --- km184 --- Neumann SKM184 --- '4011' --- Danish Pro Audio (DPA) 4011 --- sm57 --- Shure SM57LC --- mkh20 --- Sennheiser MKH20 --- c414 --- AKG C-414XLS --- beta56 --- Shure Beta 56A --- md441 --- Sennheiser MD441 U --- d6 --- Audix D6 --- '4003' --- Danish Pro Audio (DPA) 4003 --- re20 --- Electro-Voice RE20 --- '737' --- Avalon Design VT-737SP --- hv3c --- Millennia Media HV-3C --- rnp --- FMR Audio Really Nice Preamp RNP8380 --- hv3d --- Millennia Media HV-3D

Can anyone illuminate me, a poor wretch? Thank you!

-Matt


In reply to I'm a YAML noob by mchampag

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.