http://qs321.pair.com?node_id=960108


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

Right. The added complexity actually comes from introducing the say function, which takes a list.

say (caller(0))[0];

is expanding to:

say $package, $filename, $line, $subroutine, $hasargs,$wantarray, $eva +ltext, $is_require, $hints, $bitmask, $hinthash,[0];

This gives you the syntax error:

say [0];