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
> > MY problem is obtaining and passing text/html from file to a scalar > variable to be printed to mail, (using MIME::Creator). > > Unfortunately I get: 'printFile(FileHandle=GLOB(0x84b66b8))' > This means it is a typeglob (a generic entry in the Perl 5 packages (=

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

Re: text html from file to a scalar

2009-09-11 Thread Steve Bertrand
John W. Krahn wrote: > Steve Bertrand wrote: >> John W. Krahn wrote: >>> John Plum wrote: >> #---Assemble/concatenate references in both ascii and html, to make full confirmatory message bodies with order details--- $scalar_sig = "\printFile($signature)"; >>> You can not call a

Re: text html from file to a scalar

2009-09-11 Thread John W. Krahn
Steve Bertrand wrote: John W. Krahn wrote: John Plum wrote: #---Assemble/concatenate references in both ascii and html, to make full confirmatory message bodies with order details--- $scalar_sig = "\printFile($signature)"; You can not call a subroutine from inside a string. Just the $signa

Re: text html from file to a scalar

2009-09-11 Thread Steve Bertrand
John W. Krahn wrote: > John Plum wrote: >> May I introduce myself, John Plumridge, London, UK. > > John W. Krahn, Vancouver, Canada. Steve Bertrand, Port Hope, Ontario, Canada :) >> #---Assemble/concatenate references in both ascii and html, to make >> full confirmatory message bodies with ord

Re: text html from file to a scalar

2009-09-11 Thread John W. Krahn
ourse, for approaching you, via my MTNews 'console'. What a great application! MY problem is obtaining and passing text/html from file to a scalar variable to be printed to mail, (using MIME::Creator). Unfortunately I get: 'printFile(FileHandle=GLOB(0x84b66b8))' The reference assi

text html from file to a scalar

2009-09-11 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