For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > March 2005 > how to handle global variable?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to handle global variable?
Goober

2005-03-27, 3:57 am

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.


Gunnar Hjalmarsson

2005-03-27, 3:57 am

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
Goober

2005-03-27, 3:55 pm


"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:3ammiqF6betgpU1@individual.net...
> Goober wrote:
>
> 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.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com