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;
In reply to Re: Finding a line in a scalar, and copying it to a new scalar?
by ysth
in thread Finding a line in a scalar, and copying it to a new scalar?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |