Perl memory policy

Hi guys!

I have some code which could be reduced to the following...
--------------------
my [at] unsorted;
open( FH, 'test_data.txt' );

while ( <FH> ){
chomp $_;
push [at] unsorted, $_;
}

close( FH );
--------------------

The file that we are reading is quite simple: a single 0 in every line,
but the size is about 12Mb (and will be way bigger in the real
enviroment)

We are using v5.6.1 built for MSWin32-x86-multi-thread (Binary build
635 provided by ActiveState Corp)

My questions would be:
- could the snippets be written somehow else to be more effective in
sight of memory usage?
- what is the actuall memory policy of perl? Just because it is using
way more that i would except... (using 600+ Mb at the end) (I know hoe
TCL handles memory allocation but I can't find a clue about Perl's
behaviour )
- do I have any option to influence this policy?

thanks in advance!

ozy
ozy [ Do, 01 September 2005 19:23 ] [ ID #949064 ]
Perl » alt.perl » Perl memory policy

Vorheriges Thema: Can't locate Symbol.pm in @INC
Nächstes Thema: CGI perlscript that downloads a URL file