$a and $b do not have to be declared because they are special
Which means that they should probably avoided for purposes other than what they are designed and earmarked for (basically sorting operations).
@Raymond: if you *really* need to use single letter variables, start off with $c, avoid $a and $b. But don't you think it would be better to give meaningful names to your variables? I hold the opinion that giving meaningful names to variables, subroutines, filehandles, etc., is the #1 way of correctly commenting my code. Therefore, asides from quick tests under the debugger, I almost never use one-letter variable, with just one exception: loop variables, i.e. when the variable does not have any other meaning than looping through the subscripts of an array, where I find variable names such as $i, $j and $k to be acceptable. But, whereas using such loop variable is quite common in a language like C (where I come from), it is much less often useful in Perl, in which we can most of the time use better looping constructs (which usually loop directly over the elements, rather than the subscripts, of an array, thereby making meaningful names (the content of the array elements) again possible.
| [reply] |