open (XLS, $file) or die "Can't open file: $file -- $!\n"; undef $/; $message1 = (); %emailhash = ( 'to' => "toname\@company.com", 'from' => "fromname\@company.com", 'subject' => $subject2, # 'message' => $message1, 'disposition' => $file ); sendmail(%emailhash);