$sn .= $result->[0];
You're not adding any delimiter between the values ... just concatenating them. Try replacing the while loop with:
$sn = join(',', map { $_->[0] } @$ref);In reply to Re: Using join() on a MySQL arrayref
by jhourcle
in thread Using join() on a MySQL arrayref
by fivefiftyone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |