[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] next stepÉ



First, I'd like to thank everyone for being so helpful. I thought I knew a
decent amount about Perl- but I haven't worked with large memory chunks
before. =)

So- this can't sort, because of a memory error, even if perl is given 20mb
of RAM. I can't see WHAT could be going wrong. Maybe this is normal... I
hope not.

#!perl
$ARGV[0] = "seraphX:Desktop Folder:summary.tab";
select(STDOUT);
$| = 1;

print STDOUT "Reading data... ";
sleep 1;

open (IN, "$ARGV[0]");
chomp (@data = <IN>);
close IN;

print STDOUT "done.\nSorting... ";
open (OUT, ">nodup.tab");
$i = 0;
@data = sort (@data); # Out Of Memory error occurs here.

print STDOUT "done.\n Parsing... ";
$#data = -1;
until ($i == $#data2) {
	if ( $data2[$i] ne $data2[$i + 1] ) { print OUT "$data2[$i]\n"; }
	$i++;
}
print OUT $data2[$i];
close OUT;

print STDOUT "done.\n";



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch