I'm pretty new to perl and have hit a wall with a script i am trying to write. I want to add two potential values for each key in a hash. I am attempting to do it as below but i'm not sure if it is correct
I am also then trying to read each value by executing something like$uniq{"$file"} = ({"suffix1"=>"$suff"}); $uniq{"$file"} = ({"suffix2"=>"$suff"});
Is this correct..or even possible??foreach my $key (sort keys %uniq){ if ((exists($uniq{$key}{suffix1}) && ($uniq{$key}{suffix2}))){ .....
Cheers!
In reply to Multiple values per key in a hash by mow14
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |