in reply to Re^2: The maybe it is better written this way tool
in thread The maybe it is better written this way tool
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: The maybe it is better written this way tool
by ikegami (Patriarch) on Nov 15, 2009 at 01:24 UTC | |
by Anonymous Monk on Nov 15, 2009 at 03:52 UTC | |
by ikegami (Patriarch) on Nov 15, 2009 at 05:05 UTC |