in reply to UTF8 with YAML or JSON

Instead of looking at Dumper($dat) you might find print length($dat->{x})."\n" enlightening.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'