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"; }