Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: How can I improve the efficiency of this very intensive code?

by polettix (Vicar)
on Aug 07, 2005 at 00:07 UTC ( [id://481576]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How can I improve the efficiency of this very intensive code?
in thread How can I improve the efficiency of this very intensive code?

This is exactly what I was going to suggest, apart from a minor optimisation regarding the initialisation of the first value. The I recalled of the existence of reduce in List::Util, which does the job nicely. But maybe I should have been less cryptic and explain what the solution does exactly - thanks for the example, I'll update my post linking to it :)

I know it's a corner case that should not happen, but I'd check for $i2 to be defined before comparing it against $id2.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-25 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found