in reply to Re^6: Line numbers
in thread Line numbers

> fails because you are trying to index a scalar

No,it fails because it's undefined syntax

syntax error ... near ")["

and indexing a list always requires parens!

see perldata

A list value may also be subscripted like a normal array. You must +put the list in parentheses to avoid ambiguity.

Cheers Rolf