Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How would I create a reg ex that would find the line "File" in the scalar and copy the next line to a new scalar. In this case since "Hello" follows "File", I'd like to copy "Hello" to a new scalar. I know this may seem simple but I've been up all night programming and can't figure it out.$temp = "DATA\n File\n Hello\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding a line in a scalar, and copying it to a new scalar?
by ysth (Canon) on Jan 16, 2006 at 07:52 UTC | |
|
Re: Finding a line in a scalar, and copying it to a new scalar?
by davido (Cardinal) on Jan 16, 2006 at 07:50 UTC | |
|
Re: Finding a line in a scalar, and copying it to a new scalar?
by McDarren (Abbot) on Jan 16, 2006 at 07:51 UTC |