Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 having an uproarious good time at the Monastery: (5)
As of 2020-12-05 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (63 votes). Check out past polls.

    Notices?