I have a strange issue with Perl and dereferencing.
I have an INI file with array values, under two different sections e.g.
[Common]
animals =<<EOT
dog
cat
EOT
[ACME]
animals =<<EOT
cayote
bird
EOT
I have a sub routine to read the INI file into an %INI hash and cope with multi-line entries.
I then use an $org variable to determine whether we use the common array or a specific organisation array.
@array = @{$INI{$org}->{animals}} || @{$INI{Common}->{animals}};
The 'Common' array works fine, i.e. if $org is anything but 'ACME' I get the values (dog cat) but if $org equals 'ACME'` I get a value of 2 back?
Any ideas??