in reply to Re: elements not reversing inside a map
in thread elements not reversing inside a map

Ok, I had overlooked that map evaluated $_ in a list context.

My question below stil stands, however. Why does (reverse $_)||"" work?
  • Comment on Re^2: elements not reversing inside a map

Replies are listed 'Best First'.
Re^3: elements not reversing inside a map
by merlyn (Sage) on May 05, 2005 at 21:01 UTC
      Ok, but why? Shouldn't the short-circuit operator take effect then?

      From perlop:

      Scalar or list context propagates down to the right operand if it is evaluated.
      But that's "if" it is evaluated... which it doesn't seem like it would be.

        The act of evaluating the high-precedence or operator puts the reverse in scalar context.