Solved

How can I get what hashmap maps to in Perl ?

Posted on 2011-03-01
6
331 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
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
Java DateChooser? 3 36
replace a word with other 1 44
CSV file parsing thru Java 13 31
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

773 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