in reply to Re^7: Problem with traversing a two dimensional array (to create an arrayref use [ ] )
in thread Problem with traversing a two dimensional array

Oh, well, my terminology might be off and, although I think that I can claim to have a relatively good command of the English language, it is not my mother tongue and I may sometimes goof on some fine subtleties, but I was careful enough not to say that (split...) creates an anonymous array, but only that the thing does behave (at least in a number of respects) as if it were an anonymous array. Accessing elements with an index, manufacturing array slices, getting an element count in a scalar context, just to give a few examples, are things that you can do with an array and not with a list. But, OK, I have no desire to argue endlessly on this (especially not with an Anonymous Monk, where I don't even know if the person talking to me is always the same person), let's consider that you were right and forget it. I have no intention to argue any further on this.
  • Comment on Re^8: Problem with traversing a two dimensional array (to create an arrayref use [ ] )
  • Download Code

Replies are listed 'Best First'.
Re^9: Problem with traversing a two dimensional array (to create an arrayref use [ ] )
by no_slogan (Deacon) on Jan 17, 2014 at 00:13 UTC
    Accessing elements with an index ... you can do with an array and not with a list.

    Why do you say that? Are you assuming that "list" means "linked list"? That's not what we mean by "list" in Perl.

    I think you're right about the element count in scalar context. I seem to remember reading something like "there's no standard way of converting a list to a scalar," but I can't remember where.

    Anyway, I'm not trying to be argumentative, I'm just trying to clear up misunderstandings people might have with Perl. And I sometimes post anonymously when I'm on public wireless access points. Happy perling to you.