Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: PGA Golf, Round 1 - Results

by japhy (Canon)
on Jun 01, 2001 at 02:34 UTC ( [id://84776] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # 3 -- 23 chars
    # note: using $ instead of \z is *wrong*
    # note: using . without /s is *wrong*
    sub g3 { pop=~/^(.*?)\1+\z/s&&$1 }
    
  2. or download this
    sub g3 { pop=~/^(.*?)\1+\z/s;$1 }