If we want the fifth element of an array why don't we say:
$array[ 5 ]
Isn't that DWIM?
Why does @array in scalar context evaluate to the number of elements? Why not just use $#array + 1 and have an array in scalar context return the first element, or the sum of all the elements, or the total length of all the elements?
In reply to Re^3: The maybe it is better written this way tool
by Anonymous Monk
in thread The maybe it is better written this way tool
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |