Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Welcome to the Monastery
 
PerlMonks  

Re: Finding longest palindrome from a string

by japhy (Canon)
on Aug 13, 2004 at 15:55 UTC ( #382732=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub japhy {  # 74
    our$P="";pop=~m{(.+).?(??{reverse$1})
    (?{length$P<length$&and$P=$&})^}xs;$P
    }
    
  2. or download this
    sub japhy {  # 68
    our@P="";pop=~m{(.+).?(??{reverse$
    1})(?{$P[length$&]=$&})^}xs;$P[-1]
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-04-19 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls