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;
In reply to Re: loop split into a hash
by JavaFan
in thread loop split into a hash
by ag4ve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |