in reply to mapping 2nd array
It would have been well to explain what you want, instead. I'm not sure what you're trying to accomplish. It looks like you want to assign a slice to a slice inside a map in void context. But, you are assigning the value of a hash of hashes to the number of elements in an array reference, instead.
Your hash slices ought to look like @foo{LIST}. Map returns the list it produces, so you may clarify things for yourself by rewriting the map in the form, @{slice_or_whatever} = map {whatever} @results;
Your C-style for loop is confusing things, too.
will suffice.for (@{$sth->fetchall_arrayref}) { # . . . }
As always, use strict; and use warnings; will keep you out of trouble.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mapping 2nd array
by jls13 (Initiate) on Feb 13, 2005 at 21:13 UTC |