My goodness. It's a common enough occurance for someone to point to a Perl regexp and say something like "EEEeeeewww!!!". I don't want to imagine what people will say once they see the regexps used to implement backtracking in AI.
Actually, the only natural backtracking mechanism found
in Perl is in regular expressions. Backtracking is what
I use to determine primeness of numbers using regular
expressions, it's what's used in the Cookbook when regular
expressions are used to solve Diophantine equations, and
its used in my reduction of 3-CNF-SAT to regular expressions
http://perl.plover.com/NPC/NPC-3SAT.html.