my @array = qw/ foo bar baz /; my $str = do { local $" = ','; "@array" }; print $str; __END__ foo,bar,baz