$code =~ s/\n(?=.)//g # remove all but the last newline