while reading the file, chomp the line, split the line using '| ' having back col1 and col2 then push into the hash key col1 the value of col2. Hint: being values of the hash all arrayrefs you need some derefencing like in @{ $hash{ $col1 } } doing the push.