Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Can this script be Optimized?

by kcott (Archbishop)
on May 01, 2014 at 18:51 UTC ( [id://1084674]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Can this script be Optimized?
in thread Can this script be Optimized?

"One additional detail is that a new array (actually list) is always created."

That sounds like you're referring to map; if so, that changed in 5.8.1 (over a decade ago).

From perl581delta: Miscellaneous Enhancements:

"map is now context aware, and will not construct a list if called in void context."

I don't follow what you're trying to show with that code in the anonymous block. What does the "it" in "So, it would really be more like:" refer to? Is the anonymous block supposed to be a do {...} block? And $newarray is probably a typo.

-- Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found