http://www.perlmonks.org?node_id=987913


in reply to Not a HASH reference using YAML

The Loadfile function will open and read the file for you. See the code below....
#!/usr/bin/perl use YAML qw(LoadFile); my %Config; %Config=LoadFile("YAMLFile.txt"); print $Config{Item1}{SubItem1};