Says
strredwolf:
The main key behind it is the use re 'eval', which allows Perl to be inside the (?{...}) considitonal regexps.
No, that is not what
use re 'eval' does;
I suggest you consult the manual.
The
use re 'eval' is not really necessary to the program;
it is only there to allow me to
make the code simpler by abbreviating the regex.
Hmmm, it looks like a bit of source code and a state engine to me!
Nope, totally wrong!
(Except perhaps in the trivial sense that every program
is a 'state engine'.)