Is there an easy way to print out a Perl array with commas in between each element?
Writing a for loop to do it is pretty easy but not quite elegant....
You can use Data::Dump:
use Data::Dump qw(dump); my @a = (1, [2, 3], {4 => 5}); dump(@a);
Produces:
"(1, [2, 3], { 4 => 5 })"