Solved

How can I get what hashmap maps to in Perl ?

Posted on 2011-03-01
6
330 Views
Last Modified: 2012-06-27
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
Comment
Question by:Tolgar
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35012207
What exactly has this to do with Java?
0
 

Author Comment

by:Tolgar
ID: 35012260
You are right. Nothing related with Java. But maybe only related with hashmap knowledge in general.

Thanks,
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 35012325
have a browse thru here
http://perlmonks.org/?node_id=471590
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Tolgar
ID: 35012377
great,

thanks,
0
 

Author Comment

by:Tolgar
ID: 35012689
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
 
LVL 26

Expert Comment

by:wilcoxon
ID: 35012845
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Non-recursive backtracking, using a stack 1 103
Groovy:unable to resolve class error 2 70
varialbe initialization 11 30
read an xml file in perl 2 15
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now