David92 has asked for the wisdom of the Perl Monks concerning the following question:
I got a problem with my PERL program, more specific with direferencing. I think I got confused, because first I have to direference it into a Hash, then it says, it contains array elements, then again, hash elements. But let me ask you, what do you think.
$artfList = $ctf->PlanningAp->getArtifactListInPLanningFolder($session +,$parent,$filters,$recursive); %artfList =%$artfList; foreach $element (keys %artfList){ print "$element\n"; #outpus is: dataRows print "$artfList{dataRows}\n"; #output is: ARRAY(0x2139d) } @Array = @{$artfList{dataRows}}; foreach $element (@Array){ print "$element\n"; # output is: ArtifactsInPlanningFolderSoapRow += HASH(0x3a3acf0) }
And here is where I got stucked. What I notice is, that there's again a HASH reference. How to direference that array now back to hash?
This procedure should return me Artifact List (artf000,artf001,etc). The procedure is taken from online notes and that's how the return value is described.
There are NO syntax errors if you might find ones in the above code, since I typed it over and not copy pasted!
DUMPER OUTPUT:
Alot of infromation from the Database that I am trying to access, it's even too much to copy and some information of company I'd rather not display. But I dont know how to access elements, I'll try to retype structure:
bless( { 'priority' => '1', 'id' => 'artf0000', 'category' => 'V0B' }, 'ArtifactsInPlanningFolderSoapRow' ) # and it
Hope you guys can scrumble through this. The above code repeats itself for each different artifact.
Please assist me,David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Direferencing problem
by McA (Priest) on Jul 30, 2014 at 08:09 UTC | |
by David92 (Sexton) on Jul 30, 2014 at 08:17 UTC | |
|
Re: Direferencing problem
by CountZero (Bishop) on Jul 30, 2014 at 08:13 UTC | |
by David92 (Sexton) on Jul 30, 2014 at 08:18 UTC | |
by CountZero (Bishop) on Jul 30, 2014 at 18:00 UTC | |
|
Re: Direferencing problem
by tangent (Parson) on Jul 30, 2014 at 13:39 UTC | |
|
Re: Direferencing problem
by Anonymous Monk on Jul 30, 2014 at 07:29 UTC | |
by David92 (Sexton) on Jul 30, 2014 at 07:47 UTC | |
by Corion (Patriarch) on Jul 30, 2014 at 07:48 UTC | |
by McA (Priest) on Jul 30, 2014 at 07:51 UTC | |
by David92 (Sexton) on Jul 30, 2014 at 08:08 UTC | |
|
Re: Direferencing problem
by David92 (Sexton) on Jul 30, 2014 at 08:03 UTC | |
by bigj (Monk) on Jul 30, 2014 at 08:14 UTC | |
|
Re: Dereferencing problem
by Anonymous Monk on Jul 30, 2014 at 15:58 UTC | |
by Anonymous Monk on Jul 30, 2014 at 19:20 UTC | |
by Anonymous Monk on Jul 30, 2014 at 19:31 UTC | |
by Anonymous Monk on Jul 30, 2014 at 21:36 UTC |