C
chung.ley
Hi,
Another newbie question...
I have to write a program that process a huge amount of data; the end
results will be a number of different reports. I will prefer to write
a separate library/perl script for each of the reports to
separate/isolate them into their own files... However, how do I "pass"
this huge data to the "report_function" that is in their own file
without too much overhead... From what I understand, if I tried to
pass the "hash" as a parameter to the function, the function will
create a "copy" of it, which would be a significant overhead in terms
of memory and time since I am using multiple-level hash tables with
data in the Megs.... It seems that my only option is using "global",
but from what I read and also my personal experience, it seems that we
should avoid global variable as much as we can.... Can anyone give me
other options or alternatives?
Thanks....
--Chung
Another newbie question...
I have to write a program that process a huge amount of data; the end
results will be a number of different reports. I will prefer to write
a separate library/perl script for each of the reports to
separate/isolate them into their own files... However, how do I "pass"
this huge data to the "report_function" that is in their own file
without too much overhead... From what I understand, if I tried to
pass the "hash" as a parameter to the function, the function will
create a "copy" of it, which would be a significant overhead in terms
of memory and time since I am using multiple-level hash tables with
data in the Megs.... It seems that my only option is using "global",
but from what I read and also my personal experience, it seems that we
should avoid global variable as much as we can.... Can anyone give me
other options or alternatives?
Thanks....
--Chung