[Pdx-pm] Hash reference depricated..
Russ Johnson
russj at dimstar.net
Tue Oct 17 16:44:52 PDT 2006
From what I can see, the two routines here produce the same result.
for my $key ( keys %$DATA ) {
my $value = %$DATA->{$key};
print OUTFILE "$key => $value\n";
}
while ( my ($key, $value) = each(%$DATA) ) {
print OUTFILE "$key => $value\n";
}
Except, the first one results in "Using a hash as a reference is
deprecated at ./script.pl line 85." The second runs without errors.
Anyone see why?
--
Russ Johnson
Dimension 7/Stargate Online
http://www.dimstar.net
Top post? http://www.caliburn.nl/topposting.html
Random thought #14 (Collect all 25)
"There is a point beyond which even justice becomes unjust." - Sophocles
More information about the Pdx-pm-list
mailing list