How can I output a list as comma-separated values in Perl?
- by Mike
Let's say I have a list of elements
@list=(1,2,3);
#desired output
1,2,3
and I want to print them as comma separated values. Most importantly, I do not want the last element to have a comma after it.
What is the cleanest way to do this in Perl?