in reply to Re^2: Perl Hash
in thread Perl Hash
You've obviously got "use strict" in your program (which is a good habit to get into) so you need to predeclare[1] all of your variables.
foreach my $k (keys(%LogHash)) { print LOGFILE $k, ",", $LogHash{$k}, "\n"; }
Oh, but there's no need to make that print statement so complex.
foreach my $k (keys(%LogHash)) { print LOGFILE "$k, $LogHash{$k}\n"; }
[1] Or fully qualify their names, but let's not get into that :)
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|