#!/usr/bin/perl use strict; use warnings; my @names = qw (a b d f g ); # This is filled dynamically print join(',',@names);