in reply to Adding to this
In response to the first question, regarding going from @ref="name|name|..." to @ref="name=member|name=member|...", look to the map() statement following your fetchall_arrayref call. @ref is being built by doing a join() using the pipe character("|") to join the values in @names, and @names is being pieced together from the contents of the array referred to by $res. Is a map() statement best there, or would a loop actually be clearer, such as:
You at least get the idea-it is perhaps a few lines longer, but somewhat clearer, and thus easier for you to update later.# # Untested, off-the-cuff code, # probably w/errors in the reference notation # foreach my $response (@{$res}) { push(@names, $response->[0] . '=' . $response->[1]); }
Don't know if that would do it, but it may at least give you an idea on how to handle it. I hope that helps, and I look forward to the responses of other, more knowledgable monks who may can provide additional (better?) ideas.
Update: Corrected $response[1] in code segment to read $response->[1]. (Still unsure of the code, though.)
|
|---|