I too get that error if reading from test.yaml fails. Then $yaml silently becomes undef, the later use of $yaml->[0] autovivifies it into an array reference, and then it's not a blessed reference, and calling write on it fails.
I suggest to use the LoadFile and DumpFile functions instead, which seem to do proper error checking.
In reply to Re: Stucked in YAML::Tiny
by moritz
in thread Stucked in YAML::Tiny
by ckj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |