I read a whole log file into one string and try to pull out every block between two markers with $text =~ /BEGIN(.*)END/. It only matches when BEGIN and END are on the same line. I also expected /^ERROR/ to find lines that start with ERROR, but it matches only if the file itself starts with it.
Which modifiers do I need, and is there anything else that behaves differently once the string contains many lines?




