I ++'ed your original response anyway. The concepts were sound. I just questioned the implementation. I still wonder about the reason for splitting on whitespace into ($key, $rest) when $rest really isn't getting the "rest"... it's only getting one element out of several; the rest are falling into the bit bucket. But then again $rest falls into the bitbucket too since it's never used later on. As you mention, ( $key, @rest ) makes more sense. But even more clear to the reader would be ( $key, undef ) = split;
As for the chomp issue, I brought it up because without chomp you're not getting the same output that your post suggested you would get.
Anyway, as you mentioned, these are mostly style issues, though we did have slightly different interpretations as to what kind of output the OP desired.