Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: fibonacci regex

by TedYoung (Deacon)
on Jan 25, 2005 at 15:39 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://424900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-26 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found