[p4perl] Help with Hashes

Craig Leigh cleigh@blackboard.com
Wed, 29 Dec 2004 10:36:08 -0500


Hi Tony,


I have used p4::ParseForms() like this:

[-----

$p4->SetPassword($mypassword);
$p4->ParseForms();
$p4->Connect() or die ("Failed to connect to Perforce Server");

------]

then I call:

[-----

my $chglist = $p4->Run ("changes","-t","",$param);
foreach $listitem (@$chglist){
print "$listitem\n";
}

------]

which without the $p4->ParseForms() call produces this output: (which I
could work with, but)

Change 82981 on 2004/12/20 17:37:54 by hnatour@hnatourxp_dev 'scr
13742--
Change 82975 on 2004/12/20 16:41:43 by rpeterson@rpeterson_mainline 
Change 82967 on 2004/12/20 16:28:09 by hnatour@hnatourxp_dev 'scr
12653--
Change 82966 on 2004/12/20 16:23:57 by rpeterson@rpeterson_mainline 

[-----------------------------------------------------------------]

With $p4->ParseForms() the output produces this: 

HASH(0x225098)
HASH(0x18c2894)
HASH(0x18c28f4)
HASH(0x18248a8)

How do I dereference the values?

The code I use like this:

[-----

my $chglist = $p4->Run ("changes","-t","",$param);
foreach $listitem (@$chglist){
print "${%listitem}\n";

------]

gives me this:

C:\src\p4synop.pl
C:\src\p4synop.pl
C:\src\p4synop.pl
C:\src\p4synop.pl


What am I doing wrong, Sir.  

Thanks
--Craig
CM Team
Lead Engineer
x2554
 


This e-mail is intended only for the personal and confidential use of the recipient(s) named above. 
It may include Blackboard confidential and proprietary information, and is not for redistribution.