Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2017-10-23 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (276 votes). Check out past polls.

    Notices?