Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: Calculate prime factors for a given numer in a perl one-linerby Utilitarian (Vicar) |
on Dec 16, 2010 at 09:00 UTC ( [id://877453]=note: print w/replies, xml ) | Need Help?? |
I hadn't previously encountered this piece of (lateral|perversity of) thought and so I played about with it a bit. I noticed that once the regex encounters a match greater than 2^16 in length it stops matching. (eg run the command with the argument 131072 (2^17) ).
Is this a limit of the non-greedy match in regex that I am encountering?
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
In Section
Seekers of Perl Wisdom
|
|