shockme has asked for the wisdom of the Perl Monks concerning the following question:
The following code produces this:
So, I'm obviously missing the boat somewhere. I've checked out several threads on the subject and reviewed what I believe are the applicable perldocs, but I'm just not getting it. (Would anyone tell me if I was getting stupider?) I think I've stared at and studied it for so long, I've gone blind to the simplicity of the situation.Global symbol "@returnArray" requires explicit package name at ./test. +pl line 16. Execution of ./test.pl aborted due to compilation errors.
Thanks for any insight or thoughts you guys might have. I really think I'm overlooking something fairly simple, but its eluding me.
#!/usr/bin/perl -w use strict; use Data::Dumper; my %hash = { 'node_id' => '1', 'node_title' => 'whiskey', 'node_author' => 'otis', 'node_content' => 'the path to wisdom is littered with empty bottle +s', }; my $returnArray; push @{$returnArray}, \%hash; print Dumper(${$returnArray}[0]{node_content});
If things get any worse, I'll have to ask you to stop helping me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modifying an Element in an Array of Hashes (boo)
by boo_radley (Parson) on Apr 18, 2002 at 02:02 UTC | |
by shockme (Chaplain) on Apr 18, 2002 at 12:32 UTC |