in reply to out of memory! (again!)

Using strict and warnings would certainly make your life (as a programmer) a little bit easier:
use strict; use warnings; while(<DATA>) { chomp; my @pages = split(/\+\+/, $_); my @SonarData = (); my %DOWN = ();
C:\src\perl\perlmonks\636961>perl -wc 636961.pl "my" variable @pages masks earlier declaration in same scope at 636961 +.pl line 17. String found where operator expected at 636961.pl line 220, near "$ p +rint "@SonarData\n""
Update: Your script is littered with small, but subtle errors that are easily detected using strict and warnings: Once you get your script to do what you want, take a step back and consider refactoring (perl.com article).
--
Andreas