Shortcuts are our shorthand way of creating links.
You can use these in your writeups, and
in public and private messages you send.
Shortcuts all have the form [linkspec|link text].
The link text part is optional.
If you omit it (and the vertical bar separator), default link text will be used.
Each shortcut type, catalogued below, has specialized default link text.
Jump down to see the shortcut usage instructions.
Available Shortcut Types:
To link to:
- By Title:
This does a Simple Search.
If exactly one node matches, the user is taken directly to that node.
Otherwise, a page of search results is displayed.1
- By Numeric Node ID:
See How do I link to a node on this site by number? for tips on how to get the ID of a node.
With the number omitted, [id://] links to that FAQlet.
- A User:
[username]. E.g. [vroom] ⇒ vroom
In fact, this is just a case of linking to a node by title.
For each user, there is a node with the same name (their "homenode").
Linking to a user this way is really just linking to their homenode.
You can also link to a user's adjunct pages:
- Link to a user's scratchpad:
- Link to your own scratchpad:
- Link to the list of a user's writeups:
- Link to the list of your own writeups:
- The Message Outbox:
You can write
which simply links to the Message Outbox.
You can have your link pre-populate the "To:" field of Message Outbox by writing
In either case, you can override the default link title text, as usual:
[msg://|link title text]
[msg://recipient|link title text]
If you omit the title text but provide a recipient name, the recipient name will be used in formulating the link text.
You can also pre-populate the message text ("Say:") field of the Message Outbox form, like so:
[msg://recipient<message text|link title text]
If you omit the title text but provide message text, the message text will be used in formulating the link text.
All three arguments are optional. You can, for example, write
If you provide message text but omit the recipient name and title text (as in the case above),
the link text will be generated for you, and it will contain a ? character in place of the username.
(The "To:" field in the Message Outbox form will still be left blank, however.)
- Module documentation:
- A distribution on CPAN:
[dist://XML-Parser] or [dist://XML-Parser-2.33]
- General search for modules by name on:
- Module documentation on metacpan.org:
- A distribution on metacpan.org:
- General search for modules by name on metacpan.org:
- Module documentation on search.cpan.org:
- A distribution on search.cpan.org:
[searchdist://XML-Parser] or [dist://XML-Parser-2.33]
- General search for modules by name on search.cpan.org:
- Searches on an alternate server:
- A specific bug in CPAN's RT system:
- A distribution in RT:
- A search in RT:
- The CPAN search page:
[dist://] or [mod://] (no args)
- Randy Kobes' CPAN page:
[kobes://] (no args)
- The CPAN main page:
[cpan://] (no args)
- The CPAN RT main page:
[rt://] (no args)
- The Perl documentation:
- Search the Perl docs:
- Link directly to a the doc of a function or variable:
e.g. [doc://-X|file test ops]
- Link directly to a specific document by name:
- Link to a section internal to a doc:
(Note, this replaces hyphens with spaces for the link text. Try it!)
- Link to standard module docs:
e.g. [mod://File::Find], [mod://strict]
(Note that [module:// is an alias for [mod://, for those who like to type more.)
- Perl Online Documentation site:
[doc://] or [perldoc://] (no args)
See How do I link to the Perl documentation? for more info.
- Perl Source Code files/patches:
- A file:
- A patch:
- A file at a given patch number:
- The perl code repo browse/search form:
[apc://] (no args)
Note: the scheme for this shortcut type is apc because it originally linked to the Archive of Perl Changes, hosted by ActiveState.
- Official Perl 6 documentation
- A Synopsis (specification) by number: [aes://s06] ⇒ s06
- An Apocalypse (justification) by number: [aes://a06] ⇒ a06
- An Exegesis (explanation) by number: [aes://e06] ⇒ e06
- Line number in a Synopsis: [aes://s06/52] ⇒ s06/52
- Section in a Synopsis: [aes://s06/Invocant parameters] ⇒ Invocant parameters ‐ the section title is case sensitive, the letter s is not.
- Index of all Synopses, Apocalypses and Exegeses: [aes://] (no args)
- UNIX/Linux man pages:
- Search form:
[man://] (no args)
- A specific function:
Currently, you can link to either SuSE Linux versions of the man pages (the default) or to FreeBSD versions.
— To link to FreeBSD instead of SuSE Linux: [man://funcname;freebsd]
You can also specify the exact version you want, if you want something other than the default (which should be the latest and greatest):
— To link to SuSE Linux v. 7.2 man pages : [man://funcname;suse 7.2]
— To link to FreeBSD UNIX v. 7.2 man pages : [man://funcname;freebsd 7.2]
If the page you want is ambiguous by the name, you can specify which section of the man you want:
— To link to time(3) rather than time(1) : [man://time;3]
— To link to time(3) rather than time(1), FreeBSD specific : [man://time;3;freebsd]
- DuckDuckGo web searches:
[ddg://search terms] (Note that duckduckgo:// is an alias for ddg://, for those who like to type more.)
- The DDG search form:
[ddg://] (no args)
- Google web searches:
- Full search results:
- Link directly to first matching site:
- The Google search form:
[google://] (no args)
See Google Search Help for tips.
- The Dictionary:
Currently we use Dict.org, which searches a large number of on-line dictionaries and lexicons.
- Look up a word: [dict://word]
- The Dict.org search form: [dict://] (no args)
- Jargon File Entries:
- Look up a term: [jargon://search terms]
Currently this simply goes to Dict.org, constraining
the search to the Jargon File database.
- The Jargon File table of contents: [jargon://] (no args)
- Acronym definitions:
- Search: [acronym://TIMTOWTDI] ⇒ TIMTOWTDI
Keep in mind, almost any acronym has many possible expansions.
- The search form: [acronym://] (no args)
- Urban Dictionary entries:
- Look up a slang term: [ud://hurrication] ⇒ hurrication
- Urban dictionary main page: [ud://] (no args)
- A Wikipedia entry or search:
- Search: [wp://terms]
This invokes Wikipedia's search function, which is smart (like PerlMonks' Search box)
in that it leads directly to the matching article if there's only one.
(Note that wikipedia:// is an alias for wp://, for those who like to type more.)
- The Wikipedia main page: [wp://] (no args)
- A Wiktionary entry or search:
- Search: [wikt://word]
- The Wiktionary main page: [wikt://] (no args)
- A Wikibooks entry or search:
- Search: [wb://title terms]
- The Wikibooks main page: [wb://] (no args)
- A Wikiquote entry or search:
- Search: [wq://title terms]
- The Wikiquote main page: [wq://] (no args)
- A Wikisource entry or search:
- Search: [ws://title terms]
- The Wikisource main page: [ws://] (no args)
- A page on the WikiWikiWeb (aka The Wiki):
The behavior of this shortcut depends on how many words are provided as
"arguments". This is because Wiki page names must consist of at least
two words. If two or more words are provided, then a wiki page title
is constructed from them, and the shortcut links directly to that page.
(It's up to you, the writer, to ensure it links to an existing page.)
If only one word is given, then a Wiki title search is performed.
This behavior reflects the capabilities provided by the Wiki site itself,
which has extremely limited search capabilities.
Note that you can be somewhat lax with spaces and capitalization.
Any capitals provided will be respected; and otherwise, all "words"
will be initial-capped. Note that because Wiki words can only consist
of word characters (\w), all other characters will be treated as "space".
Example: to refer to HigherOrderFunction, you can write
[c2://higher order function]
To search Wiki page titles for a single term:
[c2://perl] ⇒ perl
To go to the Wiki's Front Page: [c2://] (no args)
- Info on IMDB, such as movies and actors:
- Search: [imdb://terms], e.g.
[imdb://Office Space] ⇒ Office Space
- The IMDB main page: [imdb://] (no args)
- Books by ISBN:
- Look up by ISBN: [isbn://ISBN], e.g.
[isbn://0596000278] ⇒ ISBN 0596000278
For best results, we recommend verifying the ISBN using
Barnes And Noble's search facility,
since ISBNs change with each new edition.
- The ISBN search form: [isbn://] (no args)
- Link to a LJ user: [lj://username], e.g.
[lj://theorb|theorbtwo] ⇒ theorbtwo
- The LiveJournal main page: [lj://] (no args)
- An Everything2 node:
- By title: [e2://perl] ⇒ perl
- By ID: [e2://13372] ⇒ 13372
- The Everything main page: [e2://] (no args)
- A page on Mathworld:
- Search by title: [mathworld://unique factorization domain] ⇒ unique factorization domain
- Mathworld main page: [mathworld://] (no args)
- Xkcd comic strips:
- By number: [xkcd://208] ⇒ xkcd://208
- Search strip using google, finding the most relevant: [xkcd://Bobby Tables] ⇒ xkcd://Bobby Tables
- Latest strip (at the time the link is actually followed): [xkcd://] (no args) ⇒ xkcd://
- Internet RFCs:
- Search: [rfc://822|rfc-822] ⇒ rfc-822
- The main page: [rfc://] (no args)
- Arbitrary external sites:
You can use http://, https://, and ftp://.
With no arguments, [http://], [https://], and [ftp://]
link to this usage documenation.
- General-Purpose Linking
For situations where none of the above shortcuts can do what you need, and
you think your only recourse is the explicit html
there is one more shortcut you can try:
You can use it to link to a named anchor within a document:
- [href://#notes|notes] ⇒ notes in the current node
- [href://?node_id=786921#titles|page titles]
⇒ page titles in another node.
You can use it to link to a node with additional CGI parameters:
- [href://?node_id=43037;displaytype=xml|this node xml] ⇒
this node xml
You can use it to link to another site:
- [href://http://www.perl.org/] ⇒ http://www.perl.org/
[href://] by itself (no args) links to this usage documentation.
link is an alias for href.
See New bracket-link stuff.
- Show the time!
One special shortcut type doesn't make links. The [localtime://] shortcut
is really a "macro" which PerlMonks replaces with a formatted time, localized for
the user. Each user will see the time you type in their timezone, as set in their Timezone Settings. This is similar to how most times (like posting times) are shown on the site.
- The shortcut needs as argument a time in ISO 8601 order, that is, the first four digits are year, then two digits for months, two digits for days, two digits for hours, two digits for minutes, two digits for seconds (optional). Punctutation or separators like T are ignored. Usually you want to use a UTC suffix so the date is interpretted as UTC (Coordinated Universal Time, GMT); otherwise it's interpretted as server time which is not too useful. Other timezone designators or fancy formats like day of year or week of year are not allowed. For example [localtime://20081201144400UTC] means 1st December 2001, 14:44 UTC, which renders as Dec 01, 2008 at 14:44 UTC; whereas [localtime://20081201144400] means 14:44 server time, and renders as Dec 01, 2008 at 19:44 UTC.
- In the Chatterbox, the time displayed for a [localtime://] without argument is fixed
at the point in time when the user submitted the public message.
- In a node, the time for [localtime://] without argument is updated to the current time each time the node is
Please test your links before posting them.
Rule #1: If you're writing a node, use the Preview button!
There are several ways to try out a link before using it in a post or in the Chatterbox:
Please avoid using the public chatterbox to test links. It is very annoying to your fellow users.
- /msg yourself
- Enter the full link (with or without the square brackets) in the Search box at the top of the page.
This "executes" the link immediately, taking you to wherever the link would go if you were use it in a post or message. Note that this is only useful to test the target of a link, not the title or clickability.
All Links Within PerlMonks Should Be Relative
Be sure to use a relative URL when linking to any location on the perlmonks web site.
That is, do not include the http://www.perlmonks.org part!
If you include http://www.perlmonks.org, it creates a "logout link".
This means that people who follow (click on) the link — including you! —
might find themselves looking at your intended target node as a non-logged-in user
(i.e. Anonymous Monk). This is A Bad Thing.
Therefore, constructing a link like
is not as good as [http://www.perlmonks.com/index.pl?node_id=43037|shortcuts]
which is not as good as
Best of all is to use [id://43037|shortcuts].
Specifying Link Titles
To specify the text to be displayed as the clickable part of your link (its "title"),
enter the text after the "url", separated from it by a | (vertical bar, aka pipe)
character within the  (square bracket) delimiters.
For example, [http://www.perl.com|Perl.com] is displayed as Perl.com.
In most cases, if you do not specify a title, your link's "target" (the part after the ://)
will be used as the link text.
E.g., [perldoc://perlfaq] ⇒ perlfaq.
- [http://] and kin use the entire URL. [http://www.perl.org/] ⇒ http://www.perl.org/
- [isbn://] prepends "ISBN". [isbn://0596000278] ⇒ ISBN 0596000278
- [id://] uses the target node's title. [id://483072] ⇒ PerlMonks FAQ
- [pad://] makes a default title based on whose pad is being linked to.
The [pad://vroom] ⇒ vroom's scratchpad; the default title for [pad://] is my pad.
- [localtime://] always renders as a time string (not a clickable link), irrespective of any title text given. [localtime://|When?] ⇒ Feb 23, 2017 at 14:50 UTC
Most shortcut types provide useful default titles when no target arguments are specified.
A full list of examples is available in the test cases for parameterless shortcuts.
See the second column.
1 - This is the same as entering your search terms into the Search box at the top of most nodes.
Node titles aren't required to be unique on PerlMonks, so there's always a possibility for ambiguity when linking/searching by title.
It's possible to disambiguate by node type (though this only helps if the conflicting nodes are of different types).
To do so, use the href:// style and add ;type=type to the shortcut. Example:
[href://?node=message;type=dbtable|message (dbtable)] ⇒ message (dbtable).
2 - You can also use [kobe://XML::Parser] (no "s").
This is provided for backward compatibility only. It will always be supported, but the kobes form is considered "correct" and is recommended for all new links.
Back to the PerlMonks FAQ