January 5th, 2002, 02:49 AM
New users ::: HOW TO POST A QUESTION - READ THIS FIRST
Please check this read in PHP forum
[NEW USERS] - How to post a question.
It is not particular to PHP and applies in general.
Read this before posting a thread if you are new.
~ simple thought, simple act ~
I blog @ http://jdk.phpkid.org
August 20th, 2003, 06:27 PM
Use [code] tags, NOT [php] tags!!
The above thread instructs you to put [php] tags around your code. DO NOT DO THIS FOR PERL CODE! Just use the generic [ code ] tags. It won't be colored, but it will be correct. The php tags tend to destroy Perl code (and likely other languages), especially around escape characters.
Ax brought this up and I figured it was worth a formal mention.
Also, put the tags around indented code, ie, what you should originally be working with. Example, if your post looks like this:
and someone asks you to put [ code ] tags around it, don't copy what you posted and put tags around it, copy from the original source with all the indentation, and make it look like this:
It'll make our lives easier and more willing to help. If you're feeling really industrious, check out Perl::Tidy or its command-line version perltidy.
while( <FILE> )
Andrew - Perl (and VB.NET) Monkey
Never underestimate the bandwidth of a hatchback full of tapes.
A new BBCode tag has been added to Dev Shed, in order to make it easier to link to modules on CPAN (without having to look up the URL yourself!). More specifically, it links to the appropriate search on http://search.cpan.org.
For example, to create a link to the HTML::Template module, I'd type:
This would be converted into this:
I've also requested a [perldoc] tag to be added to link to a search for the Perl documentation - watch this thread for updates on that.
Comments on this post
July 10th, 2005, 08:10 PM
I'm replying rather than editing my post above so that people will notice that something has changed.
The [perldoc] tag has now been added too - it will link to a search for whatever you specify in the tag, for example:
[perldoc=perlretut]Regular Expressions Tutorial[/perldoc]
. . . becomes . . .
Regular Expressions Tutorial
August 10th, 2005, 08:27 AM
Further to icrf's post above about using [code] tags, Perl syntax highlighting is now available by using [highlight=perl] ... code in here ... [/highlight] in posts. Here's a demonstration:
while( <FILE> )
print grep +( substr( $_, 0, 1 ) eq 'a' ), @array;
Note that this will also add links from all functions to their documentation for folks who need more of an explanation.