in reply to Re^2: accessing array elements using a reference
in thread accessing array elements using a reference
@array[0] and $array[0] are very similar. In fact, in scalar context, they evaluate to the same thing. warnings aside, there are two differences between slices and indexed elements. First, the index expression for the slice is evaluated in list context while the index expression for the element is evaluated in scalar context. Second, the slice creates a list context when used as an lvalue while the element creates a scalar context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: accessing array elements using a reference
by Anonymous Monk on May 19, 2008 at 05:42 UTC | |
by BrowserUk (Patriarch) on May 19, 2008 at 06:21 UTC |