> 
> I have this program below that work correcly but the
> performance is slow if the files are big. How can I
> write a program to do this instead the one I wrote.
> 

Without getting into too much detail there are several things that can help,
all are related to the overall architecture of the code. Generally speaking,
you do the same thing over and over. For instance, you glob "$path/*" for
each subroutine. Assuming the contents of $path do not change, do this once
and put the results in an array. 

But, more importantly, you re-read all your files for each subroutine
("while(<SCH>)"). Instead of building your sub-routines around reading for
each section/ page/whatever, try reading each file only once and do each of
those functions as you go instead of repeating it for each task. I think
this is where you are losing most of your performance.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to