in reply to Re^5: Order in which grep/map receive elements
in thread Order in which grep/map receive elements

Grep receives an array and returns an array.

What is the difference between a list and an array?

grep receives a LIST and returns a LIST.

  • Comment on Re^6: Order in which grep/map receive elements

Replies are listed 'Best First'.
Re^7: Order in which grep/map receive elements
by greengaroo (Hermit) on Oct 09, 2012 at 18:44 UTC

    Well, I have used the wrong term. A List is a series of ordered elements. An Array, in Perl, is a variable that contains a List, but a List is not necessarily always an Array. This: (1,2,3) is a List but its not an Array variable.

    Sorry about that, I didn't meant to confuse anyone.

    Thank you jwkrahn for pointing it out!

    There are no stupid questions, but there are a lot of inquisitive idiots.