while () { chomp; my ($key, $rest) = split /-/; push @{$hash{$key}},$rest; } $l=14178439; @values= exists $hash{$l}? @hash{$l}:undef; { print "\n Hash Value of 14178439 : @{$hash{$l}} \n"; } #### Hash Value of 14178439 : 2,3242342,2343242 3,234432,123123 2,34343 #### Hash key :14178439 Hash Val:2,34343,