in reply to Spliting a log file into chunks and saving it into an array
Hi, use "undef $/".
#! c:/perl/bin/perl.exe use strict; undef $/; open (LST,"c:/test/show.txt")||die "$^E ; $!\n"; my $data = <LST>; #print "$data"; my @array = split(/\*+/, $data); print "$_\n" for (@array);
I think it will help you.
Regards,
Velusamy R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Spliting a log file into chunks and saving it into an array
by tbone1 (Monsignor) on Sep 15, 2005 at 13:33 UTC | |
by Tanktalus (Canon) on Sep 15, 2005 at 15:48 UTC |