in reply to Re^4: map and return
in thread map and return

..has a prototype (just checked)

perl -le"printf qq~%10s %s \n~, $_, prototype(qq!CORE::$_!) for @ARGV" + abs int push pop map grep sort stat abs ;$ int ;$ push \@@ pop ;\@ map grep sort stat *

Replies are listed 'Best First'.
Re^6: map and return
by ELISHEVA (Prior) on Sep 03, 2009 at 12:36 UTC

    I did not use the "CORE::" prefix when I tested. I too get your results when I do.

    In any case the main point still holds: both map and sort according to your machine (and mine) have an undefined prototype. The fact of an undefined prototype does not provide an explanation of the different behavior. I only wish it were that simple. But thanks, anyway, for your help.

    Best, beth

      sort actually calls a sub. In fact, you can actually pass a sub name. map is like while. No subs are involved.