http://www.perlmonks.org?node_id=692183


in reply to Re^3: Perl module search engine
in thread Perl module search engine

Could you please provide an example?
perl -wle '$_="abc" x $ARGV[0]; m/(((.){1,20}.+){1,34}){2,4}[d]/' 10

And now tell me how long your perl takes to find out that this regex fails ;-)
$ARGV[0]time in s
30.003
40.016
50.167
62.0
723.8
8146

I wasn't patient enough to see how long it takes to match with $ARGV[0] == 9, or in other words against 27 characters of input.

Replies are listed 'Best First'.
Re^5: Perl module search engine
by jacques (Priest) on Jun 15, 2008 at 22:17 UTC
    Yes, it's a problem. I just tested your example. I am going to have to figure out a way to sniff it out and upload a new version. Maybe I should just not allow regexps? Thanks for the info.