in reply to Re^2: Loading multiple files with YAML::XS (named streams)
in thread Loading multiple files with YAML::XS

You might want to look at Config::Any.

From the docs:

load_files() attempts to load configuration from the list of files pas +sed in the files parameter, if the file exists.
The module recognizes YAML files and will parse them with the appropriate YAML library (which means you have to have it installed).

HTH

The way forward always starts with a minimal test.