use 5.010; # this has the same effect as... { local $" = ', '; say {$fh} @array; } # a shorter approach say {$fh} join ', ', @array;