in reply to [ASCII 2 HTML] Appearently unable to find simple module!

I'm not sure if it does what you mean, but shouldn't the following do what you need?

use HTML::Entities; my $ascii = <<'ASCII'; The quick brown fox jumps over the lazy god. ASCII; my $html = encode_entities($ascii); $html =~ s/\r?\n/<br>/g; print "<pre>$html</pre>";

I'm unaware of any module doing that in its entirety, but maybe you want to just serve up the ascii page with Content-Type: text/plain instead of Content-Type: text/html ?

Replies are listed 'Best First'.
Re^2: [ASCII 2 HTML] Appearently unable to find simple module!
by blazar (Canon) on Nov 30, 2008 at 14:10 UTC

    I personally believe that it does exactly what I need, except that as I wrote in the root node I would probably further wrap the the <pre> tags in <div> ones, and that's what I meant with "concocting up a solution of my own." (I can't remember the exact expression I used, but that's not fundamental...)

    As a side note, it's not a matter of serving the page in any particular way: I'm just generating a standalone HTML single file for visualization purpose playing a little with css settings. It's not really a webby thing if you know what I mean...

    --
    If you can't understand the incipit, then please check the IPB Campaign.