Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is this doing? 1

Status
Not open for further replies.

sdslrn123

Technical User
Jan 17, 2006
78
0
0
GB
What is the last line doing?
I understand the rest?

Where did $families come from?

Code:
while(<SARACEN>) {
    chomp;
    my ($family, $people) = split (/=/, $_);
    my @members           = (split /,\s*/, $people);
    foreach my $member (@members) {
        push @{$people{$member}}, $family;
        $families{$family}++;
    }
}
 
*Sigh*. It was already explained in the post where this code was given to you. Go back to your docs and read about associative arrays (hashes). In particular, look for the part on adding, reading, and modifying individual key value pairs. Once you understand hashes, then you will know exactly what $families{$family}++ is referring to.

Raklet
 
I knew I came across this somehwere...hehe
Thanks, found it.
:eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top