in reply to Reading in Text File and skipping lines
I prefer a different approach when reading a filehandle into a scalar.
my $outputpage; do { local $/; $outputpage = <TEMPLATE>; } ;
If you've not seen this before, it essentially says, "forget about what you thought an end-of-line character was, and read the whole thing." It only "forgets" for the scope of the do block, so the effect is totally isolated.
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reading in Text File and skipping lines
by dingus (Friar) on Nov 08, 2002 at 06:55 UTC | |
by BrowserUk (Patriarch) on Nov 08, 2002 at 09:58 UTC |