Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Finding longest palindrome from a string

by japhy (Canon)
on Aug 13, 2004 at 15:55 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://382732]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-19 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found