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 reply to Re^4: How to Map a scalar to a key that is an array?
by Laurent_R
in thread How to Map a scalar to a key that is an array?
by symgryph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |