Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Posting perl code samples

Status
Not open for further replies.

AndyBo

MIS
May 6, 1999
698
GB
There's been quite a few posts recently where folks have posted perl code as part of their query.&nbsp;&nbsp;Because postings are treated like HTML, the code ends up as one big paragraph and becomes difficult to read.<br><br>The guys at Tek-Tips implemented TGML (Tecumseh Group Markup Language ;^) quite some time ago to help folks get around this problem.<br><br>Basically, TGML works like HTML, but instead of &quot;&lt;&quot; and &quot;&gt;&quot; tag markers, you use &quot;[&quot; and &quot;]&quot;.&nbsp;&nbsp;Your tags should not contain spaces after &quot;[&quot; or before &quot;]&quot;.&nbsp;&nbsp;<br><br>In the examples below, I've put spaces into the tags that are being displayed so that they will be displayed.&nbsp;&nbsp;What you won't see if the &quot;proper&quot; tags that are doing the actual markup.<br><br><b>Using [ tt ] and [ /tt ] to post scripts</b><br>[ tt ] goes here<FONT FACE=monospace><br>#!/usr/bin/perl<br><br>@Array = (&quot;Hello&quot;, &quot;World&quot;);<br><br>foreach $item (@Array) {<br>&nbsp;&nbsp;print $item, &quot; &quot;;<br>}<br><br>print &quot;\n&quot;;<br></font>and [ /tt ] goes here.<br><br><b>Using [ b ] and [ /b ] to make words appear in bold</b><br>Just use [ b ]<b>before and [ /b ]</b> after the text to bold.<br><br>Anyway, you get the idea.&nbsp;&nbsp;Off to the right hand side of the page you will see a &quot;Helpful Tips&quot; box.&nbsp;&nbsp;Click on the [a href=&quot;<A HREF="[URL unfurl="true"]http://www.tek-tips.com/sitehelp.cfm&quot"[/URL] TARGET="_new">]See Full List[/a] link for more information on TGML. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
There seem to be some problems.&nbsp;&nbsp;see the post:<br><br>how do you read in a html page from another site?<br><br>and you will see that there are extra semi colons getting added.&nbsp;&nbsp;Any one else noticed this? <p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br>
 
<b>jsut testing the bold</b>
 
The spelling seems to be out aswell :) <p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br>
 
I tried being too clever putting in the link to the help page.&nbsp;&nbsp;I forgot that postings are parsed for and a HREF automatically added.&nbsp;&nbsp;The link to the help page should be <A HREF=" TARGET="_new"> that doesn't work, look at the right hand side of this page for the &quot;Helpful Tip&quot; box.<br><br>Also, rather than reading or pasting in text from another HTML page, it's probably better if you just put a link to the page.&nbsp;&nbsp;That way, if the page changes, you're posting is still current. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top