I suspect that you are exactly right ... and, if the OP will please post a fragment of the file-of-interest we could know for sure.
Probably the best YAML-processing module would be (IMHO) YAML::XS. Just point it at a file and it turns it into a Perl data structure, or vice-versa. It leverages an industry-standard binary library to do the work very efficiently, and it knows about all the standards that have evolved over time.
A search of http://search.cpan.org will today produce 1714 module-hits for the keyword “YAML.”