in reply to report generation

You may want to consider using a loop to read records in a line at at time rather than slurping up everything into an array - see "How can I read in an entire file all at once" at perldoc.perl.org.

Best, beth