in reply to creating hash of hashes from input file
is below code OK?
my $myfile = $ARGV[0]; open FILE, "<", $myfile || die "No open $!\n"; local $/; my $a = <FILE>; my @t = split(/^\n/m, $a);
Besides:
$hash{$key} .= exists $hash{$key} ? ",$val" : $val;above code will write user name one more times if it has. I guess it might not be what you want.
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
|
|---|