Please bottom post...

> 
> why not use & for a function call?  Aren't & and ( ) the same?
> I used local originally  b/c I wanted to use this globally from within
the 
> function.  Is there a preferred way to use local?
> 

& and () may not be the same, see

perldoc -q calling

I am not sure what you mean by "use this globally from within the
function".  Remember that we only see a small portion of your code, from
what I have seen there is no reason to use local in this context.
'local' just tells Perl to restore the value of the variable after you
leave the current scope, which didn't seem to be needed in this context. 

An excellent discussion of scoping can be found here:

http://perl.plover.com/FAQs/Namespaces.html

http://danconia.org

-- 
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