Create comma seperated values in perl
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2010-05-21T15:48:02Z
Indexed on
2010/05/21
15:50 UTC
Read the original article
Hit count: 179
perl
|text-formatting
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 seperated values. And 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?
© Stack Overflow or respective owner