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

[MacPerl-WebCGI] Can't MacPerl print more than 25.000 char w/out running out ofmemory?



Hi All:

First of all: I *don't* get an Out of Memory warning or anything like that.
(I did read that posting and it didn't seem the same thing).

I get some weird output with this little script (posted below). It is a copy
of another one that runs fine, except the file that this one has to read has
probably 40 more characters (no big deal) and what this one has to print is
longer. Other than that, they're twin copies and the other one works ok.

What I get for output from MacPerl  is weird: it starts from the *middle* of
where it is supposed to, then prints the end and then from somewhere at the
beginning to somewhere in between (!!!???). Weird, weird.

Weirder: (1) if I make the print statement smaller, it works!
                (2) If I use it to open the smaller file of its twin script,
it doesn't.
                (3) If run it from BBedit (with the $filename specified
instead of the  '&StandardFile'GetFile') it works too!

Conclusion (?): Does Run out of memory when it has to print something
"large" ( 36.000 characters ?!?!?), or am I creating some kind of weird and
hungry loop?

I've increased MacPerl's memory partition. I've exported both scripts as
droplets. The "small" one (print=20.000 char) works, the large one doesn't.
I've increased the droplet's memory: nothing!

What to do? Yell Help!

Thank you 

Riccardo
--
mailto:perotti@pobox.com


This is the "large" script.
__________________________
#!usr/bin/perl
use strict
require "StandardFile.pl";

##Pick the File:
$filename = &StandardFile'GetFile("TEXT");

##Open & Read the file:
open(INF,$filename) or die("I couldn't read the file!\n") ;
chomp(@datos = <INF>);
close(INF);

$i = "a";
foreach (@datos) {
@{$i++} = split(/\t/,$_);
}
 
print<<EOF; 

##NOTE: (here come 36.000 characters of HTML print with the variables set in
the foreach loop)(As said above, if lowered to aprox 25.000, it works!).

EOF

print<<EOFooter;
<!--PERL SAYS: This Output is from $filename-->
EOFooter
__________________



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org