in reply to hash with both values and keys unique to each other

Your code does not compile due to a missing semicolon after the split statement.

$value[0] implies that you have an array named @value, but I only see @val. use strict and warnings (Tip #1 from the Basic debugging checklist)

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.