in reply to Subroutine not working quite right

Just a hunch, not tested - how about trying an array reference?
return [ map { $_ = url($_, $base)->abs; } @sublinks ];
UPDATE: Abigail has you covered, and grinder explained the same answer in the ChatterBox. But i still recommend that you return a reference to the array instead, especially if you are immediately pushing it to another array.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--