Skip to main content


Does anyone have a link to the canonical documentation on Perl string literals? I'm looking to understand all of the weird escaping syntax for special chars, hex chars, unicode chars, etc. DuckDuckGo isn't giving me any answers, except random StackOverflow posts that mention \x{...}.
#perl
#perl
in reply to Rolf Stöckli

Attached: a reminder for those who flounder about on #StackOvetflow and the first page of search engine results

/ @tekki @eslr

in reply to Mark Gardner

@mjgardner yes, but what happens when you can't even find the fine manual because search has gotten that bad.
in reply to postmodern

I dunno, maybe start by looking at the man page, which is mentioned along with the official #Perl web site when you run `perl -v` to see what version you’ve got?

> Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".
> If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page

#perl
in reply to Mark Gardner

@mjgardner ah but I asked "Does anyone have a link to the canonical documentation on Perl string literals?". Instructing me to look at the perl(1) man page is neither a link nor the canonical documentation for string literals. Nor is https://perl.org/, since the actual documentation page is at https://perldoc.perl.org/perlop#Quote-and-Quote-like-Operators.

I remember getting into these very same hair splitting debates on IRC where someone would scold me to "RTFM" and I would have to explain to them that I already checked the usual places and could not find the exact answer I was looking for in said manual(s), which is why I asked the question in the first place. Maybe just trust me that I couldn't find the answer in the usual places, which is why I'm asking on here.

This entry was edited (4 weeks ago)
in reply to postmodern

Either bleat on social media, or choose to chase pointers like a real programmer:

Start at the perl(1) man page’s table of contents, under the “Reference Material” section: https://perldoc.perl.org/perl#Reference-Manual

Look at the second entry, perldata(1), under “Scalar value constructors”: https://perldoc.perl.org/perldata#Scalar-value-constructors

“String literals are usually delimited by either single or double quotes […] See ‘Quote and Quote-like Operators’ in perlop(1) (https://perldoc.perl.org/perlop#Quote-and-Quote-like-Operators) for a list.”

in reply to Mark Gardner

@mjgardner someone else answered my question already. You don't have to keep replying.

Although, this seems like an opportunity for you to help improve the accessibility (or "findability") of the Perl docs, so that mere mortals and not just "real programmers" can find what they're looking for. That seems like an awful lot of different man-pages or links to follow just to look up String literal syntax.

This entry was edited (4 weeks ago)
in reply to postmodern

Someone *did* answer your question already! And yet you still whined about the docs to *me!*