help!! perl eats up my memory!!

E

Elhanan Maayan

hi..
i've written small program to test soap attachments against java axis:
it should run on a loop until it receive a response from the servie to
stop
use strict;
use SOAP::Lite;
use SOAP::MIME;
use MIME::Entity 50.01; #private module
use IO::Dir;
my $id=1;
my @files =glob "*.tiff";
my $count=0;
my $i=0;
my $index=0;
my $total=@files;
my $r=0;

do{
$index=$i % $total;
{
my $ent = MIME::Entity->build( (Path=> $files[$index],Id=> $id) );
my $som = SOAP::Lite
# ->readable(1)
->uri("urn:Testme")
->parts(($ent) )
->proxy("http://localhost:8080/axis/Testme.jws")
->echo(SOAP::Data->name("source")->attr( {'href'=>$id} ));
$r=$som->result;
}
$i++;
}while($r!=-99);
print "Total: $i";

when i looked at the task manager i kept seeing how the memory usage
is growing and growing, it was only released when the script ended..
any way to improve this?
i tried placing inner brackets inside the loop in order to force that
my variables go out of scope (didn't worked off course)..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top