in reply to Re: Putting text file into a hash
in thread Putting text file into a hash

One another solution
perl -MData::Dumper -e 'my ($Key,$Value) = split (/:/) ; $hash{$Key} = + $Value ;END{print Dumper \%hash};' -ln 'filename'
But the above code will not handle error conditions.