in reply to Re: Probably an easy map question
in thread Probably an easy map question

Am I correct in thinking that this operates on DATA in slurp mode (i.e. reading all the lines in at once)? Or does this work like while (<X>) magic?

for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Replies are listed 'Best First'.
Re^3: Probably an easy map question
by kyle (Abbot) on Jan 15, 2009 at 04:53 UTC

    Yes, it will read the entire input before doing any work. That's true of the OP too, and the other map-based solutions I see posted.

      Thanks! I suspected that was so, but I wasn't sure.

      for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";