#!/usr/bin/perl use strict; use warnings; my %hash=( rat=> [ "acggghhh", "fhhfjfjj", "dggdgdgdg" ], mat=> [ "dhhdhdhdh" ] ); foreach my $key (keys %hash) { print $key, "=", @{ $hash{$key} }, "\n"; }