|No such thing as a small change|
Is using $#array Frowned on?by doubleqq (Acolyte)
|on Feb 13, 2014 at 20:44 UTC||Need Help??|
doubleqq has asked for the
wisdom of the Perl Monks concerning the following question:
I recently used the '$#array' operator in a script with great success. However reading in the 'Programming Perl' book it says:
"$#, do not use this; user printf instead".
I think I might be getting my operators confused here, since I am not using the output format for printed numbers (I think). But as for finding the last index in an array, the '$#array' was invaluable. Is this practice generally considered poor form? If not recommended to use, what would be a better way?