how to handle global variable?
am 27.03.2005 04:45:27 von Goober
My experiencewith perl is limited, so I need a recommendation about how to
load a variable that I need through the entire run of an application that
entails the user going through several web pages. I don't want to pass it as
a CGI to each page. Is a package the correct way? Is there a tutorial or
sample code that shows how to load it and read it later? Or is there a
better way to handle this?
Thank you for any information.
Re: how to handle global variable?
am 27.03.2005 05:12:40 von Gunnar Hjalmarsson
Goober wrote:
> My experiencewith perl is limited, so I need a recommendation about how to
> load a variable that I need through the entire run of an application that
> entails the user going through several web pages. I don't want to pass it as
> a CGI to each page. Is a package the correct way? Is there a tutorial or
> sample code that shows how to load it and read it later? Or is there a
> better way to handle this?
Maybe you want to use a cookie. CGI.pm includes methods for the purpose.
Also see http://www.cookiecentral.com/
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Re: how to handle global variable?
am 27.03.2005 20:02:38 von Goober
"Gunnar Hjalmarsson" wrote in message
news:3ammiqF6betgpU1@individual.net...
> Goober wrote:
>> My experiencewith perl is limited, so I need a recommendation about how
>> to
>> load a variable that I need through the entire run of an application that
>> entails the user going through several web pages. I don't want to pass it
>> as
>> a CGI to each page. Is a package the correct way? Is there a tutorial or
>> sample code that shows how to load it and read it later? Or is there a
>> better way to handle this?
>
> Maybe you want to use a cookie. CGI.pm includes methods for the purpose.
> Also see http://www.cookiecentral.com/
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
Thank you. I will look at it. Appreciate it.