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
In reply to Re: Where to declare?
by Rich36
in thread Where to declare?
by Rich36
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |