while( $line =~ /,/g ) { print "Matched a comma.\n"; }