dsn: 'foo' user: 'userid' password: 'supersecret' #### #!/usr/bin/perl use strict; use warnings; use YAML::XS 'LoadFile'; my $config = LoadFile('appconf.yaml'); my $dsn = $config->{dsn}; my $user = $config->{user}; my $password = $config->{password}; print "dsn: $dsn - user: $user - password: $password\n"; #### dsn: foo - user: userid - password: supersecret