RE: a little help...
- From: tjohnson@xxxxxxxxxxxx (Timothy Johnson)
- Date: Thu, 29 Sep 2005 15:16:25 -0700
"my $MyIpAddrInfo = \%MIAI;" makes $MyIpAddrInfo a reference to the
%MIAI hash. That is why you can't print it directly.
If you want to treat $MyIpAddrInfo like the hash it refers to, you have
to dereference it by prefacing it with the '%' (see example below). The
brackets are usually optional, but some people like me just use them all
the time to avoid certain problems with more complicated data
structures.
my @keys = sort keys %{$MyIpAddrInfo};
You can also indirectly access the members of the hash by using the ->
operator, so:
$MyIpAddrInfo->{ip}
is the same as
${$MyIpAddrInfo}{ip}
is the same as
$MIAI{ip}
-----Original Message-----
From: FamiLink Admin [mailto:webmaster@xxxxxxxxxxxx]
Sent: Saturday, October 01, 2005 3:04 PM
To: Wagner, David --- Senior Programmer Analyst --- WGO
Cc: beginners@xxxxxxxx
Subject: Re: a little help...
David,
Thank you for your help! I am trying to get this to work. Can you tell
me
what my $MyIpAddrInfo = \%MIAI; does? I am getting
HASH(0x8133528)
for $MyIpAddrInfo if I print it out after the:
$MyIpAddrInfo->{$ip}++;
Ryan Lamberton
<snip>
.
- Prev by Date: Re: generating a wordlist from an array of arrays
- Next by Date: Re: generating a wordlist from an array of arrays
- Previous by thread: RE: a little help...
- Next by thread: RE: a little help...
- Index(es):
Relevant Pages
|