![]() |
|
No such thing as a small change | |
PerlMonks |
Re^5: Novice problem: How to push a MooX Struct into a list?by Loops (Curate) |
on Nov 01, 2014 at 00:06 UTC ( #1105763=note: print w/replies, xml ) | Need Help?? |
boftx was right and spotted the problem with argument passing to your printdirs sub. You also had a problem with the dereferencing syntax: @($mydir->subdlist) should be @{$mydir->subdlist}Also, while it's not an error, the check to see if the array is empty is redundant, the for loop wont run if there are zero elements in the array. So the sub could be rewritten as:
In Section
Seekers of Perl Wisdom
|
|