in reply to Again on "can't use string as hash as HASH ref while "strict refs" in use"
Definitely not wanting to take away from Corion's answer above as it is very important, but I did notice something while glancing at the code.
In the for line, you use {devices}, but in the subsequent assignment to $CFG, you use {device}.
foreach my $name (@{ $heap->{cfg}->{devices} }) { my $CFG = $heap->{cfg}->{device}->{$name}->{localfile};
We won't know whether this is a typo or not unless you post some Data::Dumper output.
|
|---|