perl -e '@wperiod = qw (hi.1 hi.2 hi.3); print join (",", map {s/\.//g; $_} @wperiod), $/;' __END__ hi1,hi2,hi3