Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Complicated Nested Data Structures

by btrott (Parson)
on Aug 09, 2000 at 06:30 UTC ( #26935=note: print w/replies, xml ) Need Help??

in reply to Complicated Nested Data Structures

The get method returns an array *reference*, not an actual array. So your statement should be
$msgs[$command]{message} = $pop->get($command);
That will store the array reference in
To dump our your @msgs array--to get a sense of what it looks like, visually--you can use Data::Dumper, as jlp suggested:
print Dumper \@msgs;

Replies are listed 'Best First'.
RE: Re: Complicated Nested Data Structures
by elusion (Curate) on Aug 09, 2000 at 06:49 UTC
    Thanx. That worked beautifully, once I realized that in order to print it I need to say print @{msgs[$command]{message}}; I appreciate your help.

    - p u n k k i d
    "Reality is merely an illusion, albeit a very persistent one." -Albert Einstein

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2023-12-08 18:38 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (37 votes). Check out past polls.