in reply to Finding a line in a scalar, and copying it to a new scalar?
That is, search for a line with optional leading whitespace and ending with "File", and capture the following line.$temp = "DATA\n File\n Hello\n"; ($line) = $temp =~ /^\s*File\n(.*\n)/m;
|
|---|