For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2005 > RE: MIME::Lite message text









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: MIME::Lite message text
Tim Johnson

2005-07-25, 5:30 pm


How hard would it be to create a temporary variable where you store the
contents of the file?

################

my $data;
open(INFILE,"<my_file.txt") or die "Couldn't open file for reading!\n";
while(<INFILE> ){
$data .=3D $_;
}

# OR ###########

while(my $ref =3D $sth->fetchrow_hashref()){
$data .=3D $ref->{COLUMN};
}

################

Then you can use $data in your initialization statement.



-----Original Message-----
From: Charles Farinella [mailto:cfarinella@appropriatesolutions.com]=20
Sent: Monday, July 25, 2005 2:10 PM
To: Perl Beginners
Subject: RE: MIME::Lite message text

On Mon, 2005-07-25 at 16:46, Tim Johnson wrote:
> Looking at the documentation, it looks like what you want is the Data
> field when you initialize your message.
>=20
> Data =3D> "whatever";


That's true, but what I need is either:
Data =3D> "<whatever_filename";

or

Data =3D> "< the results of about 6 $sth->fetchrow_arrays"

I don't know how to do either, unfortunately.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com