Harry Putnam wrote:

> Yes, I see now.
>
> I think I may not have understood the meaning of `global'.  I
> understood it to mean these variables could theoretically be exported
> as in the case of `do "./this_script"; from another script.
>
> I was under the impression that a `my($var);' at the beginning of`this_script'  would
>
> prevent that... but without testing this, I'm guessing I may have it wrong.

The point here is that the script itelf is too broad a scope for most variables.  With
a few exceptions, it is best when you can see the entire scope of any variable within a
single screen.  This takes structure.  It is very much worth the effort, for the
manageablity gained.  Keeping your functions short, focused, and well-named will bear
great rewards in handling any large0scale process.

How is your work with references going?  Have you practiced much in passing arguments
by reference?  Have you gotten to a good compfort level using them?  If you want to do
serious programming, you will have to do so.

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to