in reply to Multiple values per key in a hash

$uniq{"$file"} = ({"suffix1"=>"$suff"}); $uniq{"$file"} = ({"suffix2"=>"$suff"});

You overwrite the first hashref (for suffix1) when you assign the hashref for suffix2.

# assign hashref with first key-value-pair $uniq{"$file"} = {"suffix1" => "$suff"}; # add additional key-value-pair $uniq{"$file"}->{"suffix2"} = "$suff";

perldoc perldsc should show you how to create complex data structures.

edit1: syntax error fixed

edit2: "perldoc perldsc" as link text

edit3: "edit" history edited