For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2005 > Re: our..... Lou's code









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 Re: our..... Lou's code
Lou Hernsen

2005-11-28, 3:55 am


----- Original Message -----
From: "Bob Showalter" <bob_showalter@taylorwhite.com>
To: "Lou Hernsen" <lhernsen1015@wowway.com>
Cc: <beginners-cgi@perl.org>
Sent: Sunday, November 27, 2005 12:36 PM
Subject: Re: our..


> Lou Hernsen wrote:
>
> No.
>
> A variable declared with "my" is only accessible within the enclosing
> file, block, or eval.


File is the entire program.. like a global var?
Block is the "if" or "while" or other {} framed code?
what is an eval?
if (my $var=0;$var>10;$var++)
is that when you mean? an evaluation?

>
> "our" is a declaration that allows you to use a global (symbol-table)
> variable name without a package qualifier when "use strict" is in effect.
>


from what you say "our" is used in the main program
so I don't have to declare them again in the mod?
So if I run the mod as one big ad-in program to main
and not calling subs in the mod, I don't have to pass vars in the ()'s?
stats;
and not
stats::sub($var1, $var2, etc....);

this mode only does some calulations and print to the HTML code...


thanks
Lou





Sponsored Links







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

Copyright 2008 codecomments.com