in reply to Re^2: undefined subroutine
in thread undefined subroutine
This code works fine for me.
use strict; use warnings; use YAML qw(LoadFile); use Data::Dumper; # step 1: open file open my $fh, '<', 'config.yml' or die "can't open config file: $!"; # step 2: convert YAML file to perl hash ref my $config = LoadFile($fh); print Dumper($config), "\n";
Although I have my doubts this is the reason, you could try upgrading your YAML.
Note that YAML's own documentation recommends switching to YAML::XS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: undefined subroutine
by molv (Initiate) on Apr 07, 2016 at 14:13 UTC |