#!/usr/bin/perl use strict; use warnings; my %hash=qw(das 1 ist 2 ein 3 test 4); my $size=0; map{$size+=length($_)}%hash; print "$size\n";