Re: HoA question
- From: cajun@xxxxxxxxxxxx (M. Lewis)
- Date: Fri, 29 Dec 2006 00:50:12 -0500
John W. Krahn wrote:
M. Lewis wrote:John W. Krahn wrote:my %HoH;Does it matter that the value of the HoH is undef?
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";
}
It didn't look like you needed a value, but if you do you can put whatever you
want in there.
John
Thanks John. You're correct, I don't 'need' the value. I was just wondering if the 'undef' was a problem in some way.
Thank you.
--
UNIX is a computer virus with a user interface.
00:45:01 up 14 days, 21:36, 0 users, load average: 0.11, 0.23, 0.33
Linux Registered User #241685 http://counter.li.org
.
- References:
- HoA question
- From: "M. Lewis"
- Re: HoA question
- From: "John W. Krahn"
- Re: HoA question
- From: "M. Lewis"
- Re: HoA question
- From: John W. Krahn
- HoA question
- Prev by Date: Re: HoA question
- Next by Date: Accessing the values of HoH
- Previous by thread: Re: HoA question
- Next by thread: HTML to DOC Converter
- Index(es):
Relevant Pages
|