>>>>> "Kenneth" == Kenneth Singleton <[EMAIL PROTECTED]> writes:
Kenneth> Yes, I know this should be very easy. Yes I've seen the
Kenneth> exercise in "Learning Perl". Still I can't get the darned
Kenneth> thing to work. Please help me.
What have you tried? Does this example help?
my %lastname;
while (<DATA>) {
chomp;
my ($key, $value) = split;
print "setting \$lastname{'$key'} to '$value'\n";
$lastname{$key} = $value;
}
foreach $key (sort keys %lastname) {
print "$key has a last name of $lastname{$key}\n";
}
__END__
Fred Flintstone
Barney Rubble
Betty Rubble
Wilma Flintstone
Dino
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]