http://qs321.pair.com?node_id=1105758


in reply to Re^2: Novice problem: How to push a MooX Struct into a list?
in thread Novice problem: How to push a MooX Struct into a list?

You could create with an empty array reference instead of undef:

my $dno = Dirnode[$curpath, []];

Replies are listed 'Best First'.
Re^4: Novice problem: How to push a MooX Struct into a list?
by boftx (Deacon) on Oct 31, 2014 at 22:43 UTC

    Good call, Loops. I was thinking of his question in literal terms when he asked about initializing an array and completely overlooked initializing the array ref in the struct.

    You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.