Re: Arrow dereference operator question

2007-05-31 Thread [EMAIL PROTECTED]
On May 31, 7:55 am, [EMAIL PROTECTED] (David Unric) wrote: > Based on perlref documentation arrow operator between brackets subscripts > may be omitted so the following code is valid: > > @array = ( [1, 2], [3, 4] ); > $element = $array[0][0];# shorthand for $element = $array[0]->[0] > > Coul

Re: Arrow dereference operator question

2007-05-31 Thread [EMAIL PROTECTED]
On May 31, 7:55 am, [EMAIL PROTECTED] (David Unric) wrote: > Based on perlref documentation arrow operator between brackets subscripts > may be omitted so the following code is valid: > > @array = ( [1, 2], [3, 4] ); > $element = $array[0][0];# shorthand for $element = $array[0]->[0] > > Coul

Re: Arrow dereference operator question

2007-05-31 Thread David Unric
I did suspected it would have something to do with the difference between array and list contexts. Your analysis seems to be correct. Thank you for solving this puzzle :) Regards On 5/31/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 5/31/07, David Unric <[EMAIL PROTECTED]> wrote: > Based on pe

Re: Arrow dereference operator question

2007-05-31 Thread Chas Owens
On 5/31/07, David Unric <[EMAIL PROTECTED]> wrote: Based on perlref documentation arrow operator between brackets subscripts may be omitted so the following code is valid: @array = ( [1, 2], [3, 4] ); $element = $array[0][0];# shorthand for $element = $array[0]->[0] Could somebody explai

Arrow dereference operator question

2007-05-30 Thread David Unric
Based on perlref documentation arrow operator between brackets subscripts may be omitted so the following code is valid: @array = ( [1, 2], [3, 4] ); $element = $array[0][0];# shorthand for $element = $array[0]->[0] Could somebody explain why it causes syntax error when the above rule is