in reply to use strict won't require explicit name for all variables?
In any programming generally, you should really use describing variables, because, much like "use strict", it will save you a lot of grief down the road. In perl, specifically, it also makes sure you don't clash with any special variables. Most of the time, people just don't name their variables $" or $\, even when not being verbose, so it is rarely a problem - apart from a few cases like this one.
I do understand that this was only test code, but it doesn't hurt to use names like $first_element and $second_element or something, anyways. And, use lowercase variable names, so it will never clash with for example the names from "use English".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: use strict won't require explicit name for all variables?
by Biker (Priest) on Feb 28, 2002 at 21:22 UTC |