Re: HoA question
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Thu, 28 Dec 2006 21:46:06 -0800
M. Lewis wrote:
John W. Krahn wrote:
my %HoH;
while (my $line = <DATA>){
chomp $line;
my ($prod, $flavor) = split ' ', $line, 2;
$HoH{ $prod }{ $flavor } = ();
}
for my $i ( keys %HoH ) {
print "$i -- @{[ keys %{$HoH{$i}} ]}\n";
}
Does it matter that the value of the HoH is undef?
It didn't look like you needed a value, but if you do you can put whatever you
want in there.
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
.
- Follow-Ups:
- Re: HoA question
- From: M. Lewis
- Re: HoA question
- References:
- HoA question
- From: "M. Lewis"
- Re: HoA question
- From: "John W. Krahn"
- Re: HoA question
- From: "M. Lewis"
- HoA question
- Prev by Date: HTML to DOC Converter
- Next by Date: Re: HoA question
- Previous by thread: Re: HoA question
- Next by thread: Re: HoA question
- Index(es):