in reply to Join and Concatenation
Tip #6 from the Basic debugging checklist (B::Deparse). Look how perl internally places parens:
print "\nConcatenation and join (without parens)- NOT OK\n"; $cols = '[' . join('],[', @array . ']');
If your goal is to enclose all elements of an array with square brackets, then join them with commas, I think a more natural approach uses map:
$cols = join ',', map { "[$_]" } @array;
|
|---|