NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node was taken out by the NodeReaper on Feb 17, 2010 at 13:13 UTC

Replies are listed 'Best First'.
Re: Formatting of text
by ahmad (Hermit) on Feb 17, 2010 at 11:10 UTC

    It does work in the command line, by default this module add line break \n while you are expecting it to do something like <br>\n for html.

    You'll have to look at the documentation to see if you can change the line break it use if not then simply do something like:  $body=~s/\n/<br>\n/g; after your ->format action to replace every new line with "html break" + "new line"

Re: Formatting of text
by Khen1950fx (Canon) on Feb 17, 2010 at 12:11 UTC
    It won't work for me via browser, so I "cheated" and got rid of Text::Format and did the HTML manually:
    #!/usr/bin/perl use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); my $q = new CGI; print $q->header(); my $body = "Hi Lara,<br> The Email Issue (matter getting shattering/ numbers coming in between< +br> etc..) was addressed to Joseph and he is looking into this with highes +t<br> priority. This will be fixed ASAP.<br>Thanks,<br> <br> Scott Valentine<br>DS - Manager (Mktng)<br>Xxxxxxxx Software Solutions +, Inc.<br>XXXXXXXXXXX Medical Transcription Services<br>XXXX Martins +Rd.<br>Xxxxxxxx, AZ XXXXX<br>Phone: XXX-XXX-XXXX<br>www.xxxxxxxxxxx.c +om<br/>"; print $body;