while () { if (s/\\\s*$//) { # if a \ is at the end of the line, remove it $_ .= ; # and append the next line redo; # and then redo with more of the expression } # if # do something with the expression } # while