In a reaction to
link to perl documentation
This works in the JS code works inside the console in FF and Chrome and will show hidden html-anchors ready to be cut&paste with PM markup
javascript:(function(){
var path = location.pathname.replace(/^\//,"").replace(/\.html$/,"
+");
var as =document.getElementsByTagName("a");
for (i in as) {
var l = as[i];
if (l.id && l.classList.length == 0 ){
var dlink = path + "#" + l.id;
l.innerHTML = "<b>" + path + "#[doc://"+dlink+"]</b><br>";
+
l.href = "#" + l.id
}
}
})()
The bold parts are generated by JS
perlintro#[doc://perlintro#Perl-variable-types]
Perl variable types
Perl has three main variable types: scalars, arrays, and hashes.
perlintro#[doc://perlintro#Scalars]
Scalars
A scalar represents a single value:
you can C&P the links then into a PM post, and they'll render as:
I still have problems putting it into a bookmark getting strange JS errors about keyword "var".
NB: This is far from being bug-free perldoc.perl.org and PM markup have their own idiosyncrasies! But it's a start.
Feel free to post better versions!!!
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
alert("LanX")
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.