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
In reply to Re: creating hash of hashes from input file
by xiaoyafeng
in thread creating hash of hashes from input file
by perlnewbie9292
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |