in reply to loop split into a hash
However, i seem to be overwriting my hash? I'm not sure how this can be.Here:
%values = split /:/, $line;In each iteration, you're completely overwriting your hash. Perhaps you want something like:
my ($key, $val) = split /:/, $line, 2; $values{$key} = $val;
|
|---|