From: Tom

> I'm having trouble merging YAML streams.
> 
> Basic premise is that I load multiple YAML files and I want to combine
> the result. There may be common elements within subsequent YAML files
> and I would want the last loaded to be the taken value if one already
> existed.
> 
> I have tried treating the YAML nodes like hashes:
> eg $yaml = ($yaml1, $yaml2)
> but this does not merge them.
> Also there may be more than 2 streams, but I would like to cascade
> merge them as I loop through a list of YAML files to load (eg
> $yaml=($yaml, $next_yaml)) but this gives me a void context.
> 
> Can anyone suggest how I could merge them?

You might try the suggestion here:
<http://www.perlmonks.org/?node_id=813443>. As usual, I ran across it
yesterday while looking for something else.

Bob McConnell

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to