in reply to hard versus soft reference to ARRAY's
AnomalousMonk has nailed the issue. Strictures (use strict; use warnings;) would have given you early warning that things were going wrong. Consider:
use strict; use warnings; my $dwarfs = [ qw(Doc Grumpy Happy Sleepy Sneezy Dopey Bashful) ]; print "@{$dwarfs}\n"; print "@dwarfs\n";
Prints:
Possible unintended interpolation of @dwarfs in string at ... line 7. Global symbol "@dwarfs" requires explicit package name at ... line 7. Execution of ... aborted due to compilation errors.
which should give you pause to wonder what the heck that means.
|
|---|