in reply to Confusion in naming variables in subroutines
I personally just pass all the variables I need in, assign @_ to a list of variables on the first line of the subroutine, and use the names that seem most appropriate to describe what I'm doing. This may mean that in, for instance, a module that munges strings, that I have $string in several different subroutines.
Whatever keeps the algorithm clear in the reader's mind is what you want to use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Confusion in naming variables in subroutines
by rkrieger (Friar) on Jan 24, 2007 at 11:51 UTC |