legend has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if it is possible to access a particular line in the $text variable. I mean, once it has grabbed a chunk of data, I want to print a specific line from that. Is that possible by any chance?use warnings; use strict; $/ = "_END=======\n"; while (<DATA>) { s/========KEYWORD.+\n//g; print '-' x 80, $_, '-' x 80; $text = $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File slurping into $text and then accessing a specific line?
by Narveson (Chaplain) on Feb 26, 2008 at 22:40 UTC | |
|
Re: File slurping into $text and then accessing a specific line?
by hipowls (Curate) on Feb 26, 2008 at 22:16 UTC | |
|
Re: File slurping into $text and then accessing a specific line?
by Prof Vince (Friar) on Feb 27, 2008 at 09:16 UTC |