You're replying to a comment by Peteris Krumins.
You're replying to a comment by Peteris Krumins.
I am being sponsored by Syntress since 2007! They bought me an amazing dedicated server to run catonmat on. If you're looking web services in Chicago area, I highly recommend the Syntress guys!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)


Samuel, interesting. I just changed "my $regex" to "$regex" and it works.
$ perl #!/usr/bin/perl $str = "0"x50 . "1"x50; $regex = qr/0(??{$regex})*1/; if ($str =~ /^$regex$/) { print "yes, it matches\n" } else { print "no, it doesn't match\n" }I am not exactly sure why the lexically scoped variable changed whether it matches or not. I am investigating this now.
Update: Can't do that because lexical variables aren't visible during their own initialization! That is, you can't use a lexical in the same statement that declares it. I didn't think about it when I wrote those regexes.
I fixed the article everywhere and it should now be correct. :)
Reply To This Comment