$solution is an anonymous array reference with the solution if a solution was found, and otherwise it is undef.
Note that the use of [] vs undef is necessary so you can distinguish between saying that an empty list is a valid solution, and there was no solution found.