Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: OUT OF MEMORY!

by damian1301 (Curate)
on Aug 23, 2001 at 01:41 UTC ( #107158=note: print w/ replies, xml ) Need Help??


in reply to OUT OF MEMORY!

Try replacing the foreach loop with a while loop and just loop through the file. Something like this:

open(PAGES, "<pages.txt") || die $!; my @filenames; my @titles; my @headings; my @xstuff; while (<PAGES>){ if (m/^\*{4}filename.ext\*{4}/) { s/^\*{4}filename.ext\*{4}//; chomp $_; push(@filenames, $_); }elsif (m/^\*{4}title\*{4}/) { s/^\*{4}title\*{4}//; chomp $_; push(@titles, $_); }elsif (m/^\*{4}heading\*{4}/) { s/^\*{4}heading\*{4}//; chomp $_; push(@headings, $_); }else { push(@xstuff, $_); } } close PAGES;


$_.=($=+(6<<1));print(chr(my$a=$_));$^H=$_+$_;$_=$^H; print chr($_-39); # Easy but its ok.


Comment on Re: OUT OF MEMORY!
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://107158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-09-18 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls