$records =~ s/^ # beginning of the string .* # whatever except newline \n # newline //x;