@matches = $spooler =~ /(\d+)ms/g; foreach $a (@matches){ print $a .","; } print "\n"; #### print join(',',$spooler=~/(\d+)ms/g)."\n";