• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

How can I get what hashmap maps to in Perl ?

Hi,
In Perl when I do:

print($ssc);

Open in new window


I get the following:

HASH(0x1422640)

Open in new window


How can I get exactly what it writes there?

Thanks,

0
Tolgar
Asked:
Tolgar
1 Solution
 
CEHJCommented:
What exactly has this to do with Java?
0
 
TolgarAuthor Commented:
You are right. Nothing related with Java. But maybe only related with hashmap knowledge in general.

Thanks,
0
 
objectsCommented:
have a browse thru here
http://perlmonks.org/?node_id=471590
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
TolgarAuthor Commented:
great,

thanks,
0
 
TolgarAuthor Commented:
I have a followup question on this issue:

In my PERL code the following line :

print Dumper $ssc->{'myStates'};

Open in new window


returns:

$VAR1 = [
          bless( {
                   'priority' => 'Unset',
                   'owner' => 'Unassigned',
                   'required' => 'ABCD',
                   'status' => 'Completed',
                 }, 'gState' )
        ];

Open in new window


How can I extract the 'status' from this output in Perl?

Thanks,
0
 
wilcoxonCommented:
print $ssc->{myStates}[0]{status};

If you have more than one instance of gState, you'll need to loop over the items (or something similar) to get all of the status.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now