in reply to Modifying an Element in an Array of Hashes

my %hash = { 'node_id' => '1', 'node_title' => 'whiskey', 'node_author' => 'otis', 'node_content' => 'the path to wisdom is littered with empty bottle +s', };
This is a hashref, not a hash. I'm curious as to why you didn't get an error on this before the one on line 16. under activestate 5.6.1 build 631, once this is corrected (change braces to parens), it outputs
$VAR1 = 'the path to wisdom is littered with empty bottles';
update :
my %hash = ( 'node_id' => '1', 'node_title' => 'whiskey', 'node_author' => 'otis', 'node_content' => 'the path to wisdom is littered with empty bottle +s', );
This is a hash, see the parens? like my %hash=(), but a hashref uses braces : my $href={}

Replies are listed 'Best First'.
(shockme) Re: Re: Modifying an Element in an Array of Hashes (boo)
by shockme (Chaplain) on Apr 18, 2002 at 12:32 UTC
    Well, sure I see the parens - now that you've taken me by the back of the head and pointed my nose right at them. ;)

    I got so caught up in getting the data out that it never occurred to me that the problem might be how data was being put in. I guess I was so focused on the format of the print statement that I couldn't see anything else.

    Thanks, boo_radley!

    If things get any worse, I'll have to ask you to stop helping me.