|Perl Monk, Perl Meditation
Passing a list as a subroutine's return value ( list of HTML::Element objects )by mldvx4 (Friar)
|on Sep 27, 2023 at 08:28 UTC
mldvx4 has asked for the wisdom of the Perl Monks concerning the following question:
I would like to pass a list of HTML::Element objects as a return value from a subroutine. I thought since the list would be just a list, that the normal approach would apply. Clearly I am misunderstanding something, or perhaps there is a more appropriate approach:
I would expect that the script (minus the exit) to produce a nested HTML unordered list. What happens is that the variable actually recovered from the subroutine is basically empty, as seen by comparing the output from the two Dump calls.
I've looked at the manual pages for the modules given above as well as the one for perlrref. Please nudge me in the right direction.