Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Novice problem: How to push a MooX Struct into a list?

by Loops (Curate)
on Oct 31, 2014 at 22:31 UTC ( [id://1105758]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1105758]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-16 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found