in reply to Re^3: How to Map a scalar to a key that is an array?
in thread How to Map a scalar to a key that is an array?
Why do you comment out these two lines? It is usually a very bad idea.#use strict; #use warnings;
Otherwise, the more idiomatic way to write your foreach loop would be to declare $key within the loop:
foreach my $key (keys %data) { print "$key,$data{$key}\n"; }
In Section
Seekers of Perl Wisdom