Subject: | Errors in documentation, SYNOPSIS |
The SYNOPSIS contains two errors - or at least strong ambiguity - concerning the linenumbers.
Now:
$array[13] = 'blah'; # line 13 of the file is now 'blah'
print $array[42]; # display line 42 of the file
Should be:
$array[13] = 'blah'; # line 14 of the file is now 'blah'
print $array[42]; # display line 43 of the file
or maybe even better:
$array[0] = 'blah'; # first line of the file is now 'blah'
print $array[42]; # display line 43 of the file
to make clear that the line numbering starts at 0.
The DESCRIPTION clearly states that the line numbers start at 0, but imho the comments in the SYNOPSIS are misleading.
Cheers,
Torsten