http://www.perlmonks.org?node_id=604867


in reply to How to send mail containing multiple lines using Mail::Mailer?

Where's the code that fills $mailContents?

Does it perhaps look like this:

my $file = 'mailmessage'; open( my $fh, $file ) or die "couldn't read file - $!"; my $mailContents = <$fh>; close( $fh );

... or similar?

You might instead want:

my $file = 'mailmessage'; open( my $fh, $file ) or die "couldn't read file - $!"; my $mailContents; { local $/; $mailContents = <$fh>; } close( $fh );

HTH



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)