in reply to Ode to Death to Dot Star
If you use the /s modifier, it will treat $line as a single-line, thus allowing the dot to match newline characters.