yoda54 has asked for the wisdom of the Perl Monks concerning the following question:
How can I slurp multiple lines to a variable? I have a multiple line range that I need to pull out.
Thanks for any advice!
open(F, "file"); while(<F>) { if (/StartPattern/.../StopPattern/) { # if matches, slurp all of this contents to a variable } close(F);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Slurp multiple lines to a variable
by aaron_baugher (Curate) on May 14, 2015 at 01:51 UTC | |
by yoda54 (Monk) on May 14, 2015 at 01:54 UTC | |
|
Re: Slurp multiple lines to a variable
by Anonymous Monk on May 14, 2015 at 01:43 UTC |