Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: PM Poster (util for ease of posting / reply)

by David Caughell (Monk)
on Jul 13, 2003 at 01:09 UTC ( [id://273697]=note: print w/replies, xml ) Need Help??


in reply to Re: PM Poster (util for ease of posting / reply)
in thread PM Poster (util for ease of posting / reply)

Alright. I have to admit at this point that you were absolutely right about not posting!

That being said, I like writing in "natural text" and I'll work on a rewrite that will do something to convert that to paragraphs instead of breaks.

"For fate which has ordained that there shall be no friendship among the evil has also ordained that there shall ever be friendship among the good." - Plato / Socrates

Replies are listed 'Best First'.
(jeffa) 3Re: PM Poster (util for ease of posting / reply)
by jeffa (Bishop) on Jul 13, 2003 at 15:00 UTC
    This is by no means perfect, but it's a step up from your original code.
    #!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); print header, start_html('PM Poster'), start_form, textarea('post',undef,8,30), submit('go'), end_form, ; if (param('go')) { for (split /\s*\n(?:\s*\n)(?!.*\n*<\/code>)+/, param('post')) { $_ =~ s/<(\/?)code>/<$1tt><$1pre>/g; print p($_),"\n"; } } print end_html; __END__ lines of source: 29 (including __END__ block) empty lines: 5 commenting (shebang to be considered code): 6 lines containing only "}" or ";": 3 lines of code: 10 (first print is really only 1 line)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://273697]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-28 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found