in reply to Re: Spliting a log file into chunks and saving it into an array
in thread Spliting a log file into chunks and saving it into an array

This will work, but a word of advice from someone bitten by it before: save off that $/ variable first!

#! c:/perl/bin/perl.exe use strict; $tmp_eol=$/; undef $/; . . .
That way, when you are done splitting the chunks, you can take each array element and split them along $/ as you normally would do so.

--
tbone1, YAPS (Yet Another Perl Schlub)
And remember, if he succeeds, so what.
- Chick McGee

Replies are listed 'Best First'.
Re^3: Spliting a log file into chunks and saving it into an array
by Tanktalus (Canon) on Sep 15, 2005 at 15:48 UTC

    That's what local is for ;-)

    my $line = do { local $/; <LST>; };