Re: text html from file to a scalar and mail

2009-09-16 Thread John Plum
In article , John Plum wrote: In the test i mentioned previously, the variable to be handed to the message body , from the slurp subroutine, should read ${signature_ref}, not $customer_msg_html, as I wrote in the message. I'm sorry, i had adapted the script hoping to cut it down, for your eas

Re: text html from file to a scalar and mail

2009-09-16 Thread John Plum
Well thanks to Shlomi and Jenda. I followed up the reccommendation for slurp, investigated some solutions, and targetted File::Slurp, with two tests, and some interesting results, which follow. use CGI; use warnings; use diagnostics; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/ use File

Re: text html from file to a scalar and mail

2009-09-13 Thread Shlomi Fish
On Sunday 13 September 2009 02:43:52 Jenda Krynicky wrote: > From: Shlomi Fish > > > > use FileHandle; > > >my $signature = new FileHandle; > > > $signature->open("<$signature_file")or die "Could not open > > > file\n"; > > > > You should use IO::Handle instead of File::Handle (or IO::F

Re: text html from file to a scalar and mail

2009-09-12 Thread Jenda Krynicky
From: Shlomi Fish > > use FileHandle; > >my $signature = new FileHandle; > > $signature->open("<$signature_file")or die "Could not open > > file\n"; > > You should use IO::Handle instead of File::Handle (or IO::File in your case), > and use the three args open. It's nice you've used di

Re: text html from file to a scalar and mail

2009-09-12 Thread Shlomi Fish
Hi John! Nice to meet you, and welcome to Perl. I'll try to answer as well as I can. Note that I will also give you some general Perl best practices and links that may not be a cause of the problems you are having. On Saturday 12 September 2009 11:32:20 John Plum wrote: > HI Folk, > > May I in

text html from file to a scalar and mail

2009-09-12 Thread John Plum
HI Folk, May I introduce myself, John Plumridge, London, UK. - I'm still in awe of this whole creation we're in. Nice to meet you. I have a reason of course, for approaching you, via my MTNews 'console'. What a great application! MY problem is obtaining and passing text/html from file t