use Data::Dumper; my @text = qw(das ist ein Test); my $hashref = {to => 'asd', subject => 'Testmail', msg => @text}; print Dumper $hashref;