Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: map and return

by Anonymous Monk
on Sep 03, 2009 at 12:27 UTC ( [id://793165]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://793165]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-28 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found