I have a number of database queries that return array references. I'm then putting each array reference into a hash so I can return it as json.
I want to modify each arrayref to produce a comma separated string. I've tried using the following to convert each reference and add it to my hash:
This returns "key":["val1, val2"] but I need each word to be quoted like this "key":["val1", "val2"].$return->{$w} = [join(', ', map { $_->[0] } @$rows)];
Can anyone spot what I'm doing wrong?
In reply to Quoting each word in an arrayref by soundX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |