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


in reply to Re: 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

perl -le '$_="123ms456ms789ms"; $_ =~ /(\d+)ms/g; print "$1,$2,$3\n"; +'
prints just 123,,