note
moritz
<p>I too get that error if reading from <c>test.yaml</c> fails. Then <c>$yaml</c> silently becomes [doc://undef], the later use of <c>$yaml->[0]</c> autovivifies it into an array reference, and then it's not a blessed reference, and calling <c>write</c> on it fails.
<p>I suggest to use the LoadFile and DumpFile functions instead, which seem to do proper error checking.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-616540">
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
</div></div>
981973
981973