Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: fibonacci regex

by TedYoung (Deacon)
on Jan 25, 2005 at 15:39 UTC ( #424900=note: print w/replies, xml ) Need Help??


in reply to fibonacci regex

Nice, this reminds me of a function to test if a number if prime:

sub isPrime { ('1' x $_[0]) !~ /^(11+)\1+$/; }

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Replies are listed 'Best First'.
Re^2: fibonacci regex
by ambrus (Abbot) on May 10, 2010 at 19:27 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://424900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-04-12 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?