----- Original Message -----
From: "Capacio, Paula J" <[EMAIL PROTECTED]>

I guess I just don't understand references after all, can anybody spot
what I'm doing wrong?
TIA
Paula

Rather than do that, I'll just post some code that works for me. ( It's
easier :-)

A couple of curiosities about my code.

First:
Since '$insModProps{$key1}' is a hash reference I thought that I should be
able to dereference it with:

my %deref = %$insModProps{$key1};

but that produced a syntax error. Instead, I had to put:

my $hash_ref = $insModProps{$key1};
my %deref = %$hash_ref;

Is that right ? Or is it likely there was some other syntax error involved ?

Second:

I've used ppm to install only 2 or 3 modules, yet this script reveals
details of many more than that - but not all modules that I've installed.
Which makes me wonder "why?". ( I don't, however, wonder to the extent that
I'll go hunting for the answer, myself - but if someone likes to explain why
some modules are being 'caught' while others are not, then I'll be glad to
receive that explanation.)

##################################
use PPM;
print "PPM Installed Module Properties....\n";
my %insModProps = PPM::InstalledPackageProperties();
foreach my $key1(keys %insModProps) {
print "$key1\n";
my $hash_ref = $insModProps{$key1};
my %deref = %$hash_ref;
foreach my $key2(keys %deref) {
print "  $key2: $deref{$key2}\n";
}
}
######################################

Cheers,
Rob

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to