Next | Program Repair Shop | 189 |
if ($#files > -1) { ... }
$#array is not a red flag
I did a study last year
http://perl.plover.com/yak/flags/dollar-pound/
Only about 20% of surveyed uses of $#array were incorrect
A red flag is "almost always a mistake"
$#array is only "often a mistake"
Still, you should treat $#array with caution
Many uses of $#array should have been @array instead
Next | Copyright © 2002 M. J. Dominus |