in reply to Output data into an email message.

Rather than messing around with pipes, why not just capture the file to a scalar:

open RES, 'bas.txt'; my $msg; do { local $/; $msg = <RES> }; close RES;

...then just send that.

my %mail = ( To => 'toemailhere', From => 'fromemailhere', Subject => "Output", Message => $msg );

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re: Re: Output data into an email message.
by Anonymous Monk on Sep 03, 2002 at 17:29 UTC
    Thanks!!! Just not sure about what your doing with: my $msg; do { local $/; $msg = <RES> }; I am not familiar with local $/; part?? If possible can you explain? I assume the 'do' is a do while statement??

      local $/ means "don't split lines"

      do { } means "only here"

      It combines to: "read whole file as if it were a single line"

        Thanks for all the help and explanation to solve my problem!