in reply to How do I execute an array element?

$incl has to contain a reference to a function (e.g. $incl = \&my_func), or the name of a function if strict 'subs' is off (e.g. $incl = 'my_func'). In your case, it contains much more than that. It contains a bit of (uncompiled) Perl code.

You have two options.

There are subtle differences in the meaning of $page and $error between the two: