in reply to Where to declare?
And this -
As a matter of fact, you should stay away from using & to call subroutines unless you understand how it's different from calling them with (). Calling with & makes @_ in the called subroutine an alias for @_ in the caller; () makes a copy instead. So changing the parameters in the subroutine could affect the variables used in the main program. This is probably not what you expect! Be careful.
- is definitely information I can use. I tend to be pretty liberal about using both "&" and "()" in my subroutine calls. I didn't realize there was a difference.
Thanks for the help and enlightenment...
Rich36
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Where to declare?
by tye (Sage) on Oct 24, 2001 at 23:36 UTC |