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

dpath2o has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Monks, I hope a quick question; I had a hard time finding any leads here or here, so I've come here! My problem is that I have a YAML configuration file:

. . . stations : [ ... , ghed, lanc, ... ] . . . ghed : table_type : lluv rdl9 pattern_type : measured lanc : table_type : lluv rdl8 pattern_type : ideal . . .

I read this file in just fine with:

my $params = HFR::SeaSonde::FileOps->new_operation();

which calls the package that, for the purpose of this query, does this:

my $config_file = exists $args{config_file} ? $args{config_file} : +$ENV{"HOME"}.'/acorn_perl.yml'; $self = LoadFile $config_file;

and returning back to the calling script:

my @stations = @{$params->{codenames}->{codar_stations}};

My PROBLEM is this:

foreach my $station (@stations) { my $table_type = $params->{local}->{$station}->{realtime}->{tabl +e_type}; print $table_type."\n"; } exit;

which prints nothing and exits. I know my problem is $station as a 'field name'. Is there a solution to this?