Hello everybody,
I'm somewhat new to Perl/CGI, and I'm coming from a Java/JSP background.
I'm writing a small prototype and need to load some "heavy" data (~200MB) into a data structure.
Now, I'd obviously like to avoid loading the data with every request. So far I managed to use a "static" variable (one enclosed in a {} block), but this seems to work for a few requests. After some inactivity time, the next request will have to load the data again.
From my JSP experience, this would seem to be a sort of session variable that remains available until the session expires.
How can I set a "global" or "application" variable? Not sure if these terms apply to CGI... Is it possible to have a variable shared by all sessions of an application?
Btw, I'm just using "use CGI qw(:standard)" at the moment.
Thanks