Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Golf (Inspired): Repeated Phrases

by chipmunk (Parson)
on May 10, 2001 at 21:01 UTC ( [id://79476] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub repeated {
    ($_,$t,$n,$m,@p)=@_;
    for$i($n..$m){$t=~$1&&push@p,$&while/\b(?=((\w+\b ?){$i}))/g}@p
    }