http://www.perlmonks.org?node_id=473555


in reply to Re^2: How do i extract 3 variables from each line in a file, and print them to a new file
in thread How do i extract 3 variables from each line in a file, and print them to a new file

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