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
#perl
\x{...}
.#perl
Kalamata Hari
in reply to postmodern • • •Overview: https://perldoc.perl.org/perl#Reference-Manual
Turns out you want https://perldoc.perl.org/perlop#Quote-and-Quote-like-Operators.
perl - The Perl 5 language interpreter - Perldoc Browser
perldoc.perl.orgpostmodern
in reply to Kalamata Hari • • •Kalamata Hari
in reply to postmodern • • •@eslr Yes, it's called the Unicode standard. 😉
https://www.unicode.org/charts/
Unicode 15.1 Character Code Charts
www.unicode.orgRolf Stöckli
in reply to postmodern • • •perlop - Perl expressions: operators, precedence, string literals - Perldoc Browser
perldoc.perl.orgMark Gardner
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
postmodern
in reply to Mark Gardner • • •Mark Gardner
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
The Perl Programming Language - www.perl.org
www.perl.orgpostmodern
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.
The Perl Programming Language - www.perl.org
perl.orgMark Gardner
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.”
perl - The Perl 5 language interpreter - Perldoc Browser
perldoc.perl.orgpostmodern
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.
Mark Gardner
in reply to postmodern • • •