in reply to Re^2: Class::DBI error?
in thread Class::DBI error?
is equivalent tofor ( $thread ) { my %data2; $data2{author} = $thread->author; $data2{date} = $thread->date; $data2{content} = $thread->content; push @d_body, \%data2; }
Still I don't see why you need @d_body. I would simply usepush @d_body, {}; $d_body[-1]->{$_} = $thread->$_ for ("author", "date", "content");
and later in the codemy $d_body; $d_body->{$_} = $thread->$_ for ("author", "date", "content");
body=> [$d_body],
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Class::DBI error?
by stonecolddevin (Parson) on Jun 10, 2005 at 12:30 UTC |