in reply to How do I print an array with commas separating each element?
For completeness, here's a verbose solution:
my $x; my @a = qw(one two three); print "$a[$_-1], " while $x++ < $#a; print "$a[$#a]";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: How do I print an array with commas seperating each element?
by extremely (Priest) on Feb 14, 2003 at 18:26 UTC |
In Section
Seekers of Perl Wisdom