use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); while( my($k,$v) = each(%$hr) ) { my $member = $zip->addString( $v->{content}, $v->{FileName} ); } #here should be a line how to access zipped contents