in reply to perlmonks downloadable code blocks
my $post_body = ...from db...; my $part = $cgi->param{part}; my $block = ($post_body =~ m{<c>(.*?)</c>}gi)[$part]; if (!defined($block)) { ...error... } else { print("Content-Type: text/plain\n\n$block"); }
* — PM recognizes <c>...</c> but not <c >...</c> like it does for other tags, and PM recognizes code blocks inside of HTML comments.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perlmonks downloadable code blocks
by debiandude (Scribe) on Apr 11, 2008 at 07:40 UTC | |
by ikegami (Patriarch) on Apr 11, 2008 at 07:55 UTC | |
by debiandude (Scribe) on Apr 11, 2008 at 09:19 UTC | |
by ikegami (Patriarch) on Apr 11, 2008 at 10:23 UTC | |
|
Re^2: perlmonks downloadable code blocks
by debiandude (Scribe) on Apr 12, 2008 at 00:33 UTC | |
by ikegami (Patriarch) on Apr 12, 2008 at 02:42 UTC |