X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq9.pod;h=7fc0cdc3c1540a4ef9e48fc565c5fa3a670a0731;hb=73659bf1a819ac7d9f9fcae022ed8755e46824eb;hp=2443fc9cdbe07743a362e2ccdad0af6293615db1;hpb=f29c64d6c131b79fab4ecd5f3a3b5afc6803e2a1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index 2443fc9..7fc0cdc 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -77,7 +77,9 @@ stamp prepended. =head2 How do I remove HTML from a string? The most correct way (albeit not the fastest) is to use HTML::Parser -from CPAN (part of the HTML-Tree package on CPAN). +from CPAN (part of the HTML-Tree package on CPAN). Another correct +way is to use HTML::FormatText which not only removes HTML but also +attempts to do a little simple formatting of the resulting plain text. Many folks attempt a simple-minded regular expression approach, like C.*?E//g>, but that fails in many cases because the tags @@ -399,7 +401,7 @@ Sys::Hostname module (which is part of the standard perl distribution), you can probably try using something like this: use Sys::Hostname; - $address = sprintf('%s@%s', getpwuid($<), hostname); + $address = sprintf('%s@%s', scalar getpwuid($<), hostname); Company policies on mail address can mean that this generates addresses that the company's mail system will not accept, so you should ask for