⭐ in reply to How do I print an array with commas separating each element?
Observe the difference in effects between $" and $, —
Output:$\ = "\n"; my @a = qw( One Two Three ); { local $, = ','; print @a; print "@a"; } { local $" = ','; print @a; print "@a"; }
One,Two,Three One Two Three OneTwoThree One,Two,Three
|
---|
In Section
Seekers of Perl Wisdom