Solved

How can I get what hashmap maps to in Perl ?

Posted on 2011-03-01
6
329 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
Comment Utility
What exactly has this to do with Java?
0
 

Author Comment

by:Tolgar
Comment Utility
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
Comment Utility
have a browse thru here
http://perlmonks.org/?node_id=471590
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Tolgar
Comment Utility
great,

thanks,
0
 

Author Comment

by:Tolgar
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

772 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

12 Experts available now in Live!

Get 1:1 Help Now