while( ) { my @matches = /(\w+)/g; print join( ',', @matches ), "\n"; }