open RES, 'bas.txt'; my $msg; do { local $/; $msg = }; close RES; #### my %mail = ( To => 'toemailhere', From => 'fromemailhere', Subject => "Output", Message => $msg );