The program is a simple n-queens solver written in "continuation
passing style" (aka CPS).  This means...

* All function calls appear in places where the caller will itself return
  immediately upon the return of the called function.
* All function results are ignored.
* Perl therefore need not to put anything on the stack (because it need
  not return).  But -- alas -- it does.

The first argument to every function is the continuation, a closure that
tells it what to do with the result instead of returning it.

Why CPS?  Well, translating into CPS is the standard way of implementing
functional programming languages.  From CPS to machine code is not that
far.  CPS has other uses, but they're too bizarre to mention here.

This program requires quite a lot of stack space due to perl's waste.
For the same reason, termination (after it does whatever it does) can take
several minutes.
