# convert the next dot to an underscore, as long as there's at least two dots s/\./_/ while /\..*\./;