|
|
| "be consistent" | |
| PerlMonks |
RE: (tilly) 2 (possibilities): interchanging variables the tough wayby tilly (Archbishop) |
| on Aug 31, 2000 at 12:08 UTC ( [id://30496]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Looking at this bugs me. Manipulating your input arguments this way works, but the side-effects can surprise and amaze. I would not do this lightly. My overall feeling is that if you feel the need to rotate your data, you should have an array rather than a list of variables. Then you could much faster, without resorting to nasty side-effects. Generally when I see myself wanting to resort to "bad" techniques like side-effects, I take that as a danger sign and go looking for a more fundamental mistake in my code...
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||