in reply to Can a hash name have the same value twice.
open (FILE,"c:/file.txt"); %hash=(); while (<FILE>) {chomp; split /:/; if ($hash{$_[0]}){$hash{$_[0]}.=",$_[1]";} else {$hash{$_[0]}=$_[1];} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: Can a hash name have the same value twice.
by Anonymous Monk on Jan 22, 2008 at 16:35 UTC |