I have a hash table like this rat=>"acggghhh" mat=>"dhhdhdhdh" rat=>"fhhfjfjj" rat=>"dggdgdgdg" I want to take this into a hash and wants my same key to contain the different values together (e.g. rat=acggghhhfhhfjfjjdggdgdgdg mat=dhhdhdhdh) how can i do these I wrote the code but it is not working
#!/usr/bin/perl -w use strict; my ($key,$value); my %hash=(rat=>"acggghhh", mat=>"dhhdhdhdh", rat=>"fhhfjfjj", rat=>"dggdgdgdg"); while(($key,$value)=each %hash){ print "$key and $value \n"; }
In reply to question related to hash by viktor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |