develooper Front page | perl.beginners | Postings from February 2002

[Q]Setting global variables.

Thread Next
From:
Bhanu Prakash
Date:
February 22, 2002 07:25
Subject:
[Q]Setting global variables.
Message ID:
20020222152503.31757.qmail@web11806.mail.yahoo.com
Perl Gurus,
   How can I set global variables in perl.?
I'm trying to do something like..

if(param())
{
my $myvar=param("myvar");
if(param("myvar2"){
use $myvar here..
Has some script to show a form..

}
else {
On submitting the form, user enters here..
someother use of $myvar..
Here, my script is showing value of $myvar as null.
I wanted to use the same value of myvar which I had
before submitting the form.
}

Am I missing something? Or should I set a global
variable for myvar?!
Thanks
Bhanu.

=====
Bhanu Prakash G V S

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About