That first regex led me to an interesting "Abigailism" for Fibonacci numbers:
http://www.perlmonks.com/index.pl?node_id=98691 perl -le '(1 x $_++) =~ /^(1(??{1x$-[1]}))*$/ && print while 1' perl -le 'print "Fibonacci" if (1x(-1+pop)) =~ /^(1(??{1x$-[1]}))*$/' <NUMBER> -Gary > -----Original Message----- > From: Mtv Europe [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 17, 2002 12:28 PM > To: [EMAIL PROTECTED] > Subject: Re: Blast from the past: "Triple Challenge Tight Coding" > > > Hello Ton! > > > Near the end it's going to match anyways, so you can do: > > -p @z=a..z;$#z--until/@z[-4..-1]/x;$_ x=@z>3 > > Nothing to add, nothing to delete in this /@array[slice]/x variant. > > And how nice final result is, let me quote it again: > > $_ x=/(.)((??{chr 1+ord$+})){3}/ > > That strong style reminds of > http://www.perlmonks.com/index.pl?node_id=98687 > http://www.perlmonks.com/index.pl?node_id=100468 > > It's amasing that regexes always win. > > --- > Mtv Europe > >
