in reply to Re^2: splitting directly to hash
in thread splitting directly to hash

Try to visualise map as an assembly line. The right conveyor belt bring list values one by one and feeds them to the block. The block executes for each of these values and in turn produces zero, one or multiple values which are put on the left conveyor belt.

step 0: () {map} (1 2 3) step 1: (1 undef) {map} (2 3) step 2: (1 undef 2 undef) {map} (3) step 3: (1 undef 2 undef 3 undef) {map} ()

Replies are listed 'Best First'.
Re^4: splitting directly to hash
by texasperl (Sexton) on Nov 21, 2006 at 19:36 UTC
    What a great visualization of the map function. ++! Wish I had understood it this way back when I first started.
Re^4: splitting directly to hash
by OfficeLinebacker (Chaplain) on Nov 22, 2006 at 15:03 UTC
    Seconded! Lucky for me I think it's early enough that I have a whole new conceptualization of 'map.' Thanks.

    _________________________________________________________________________________

    I like computer programming because it's like Legos for the mind.