Differences between revisions 4 and 7 (spanning 3 versions)
Revision 4 as of 2022-09-26 21:34:14
Size: 906
Comment:
Revision 7 as of 2023-01-13 06:06:24
Size: 1195
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
This article refers to '''Perl 5''', not [[raku||Perl 6 a.k.a. Raku]]. This article refers to '''Perl 5''', not [[Raku||Perl 6 a.k.a. Raku]].
Line 25: Line 25:
`perl(1)` is better known for its powerful yet obfuscated syntax, especially in the spirit of Bash one-liners. `perl(1)` is better known for its powerful yet obfuscated syntax, especially in the spirit of Bash one-liners. As an example (credit to [[https://groups.google.com/g/comp.lang.perl.misc/c/nK-lswsaMec/m/DBL87v4FxOwJ|Randal L. Schwartz]]):
Line 31: Line 31:
Or more humorously: Or more humorously (credit to [[https://www.cpan.org/misc/japh|Raymond Chen]]):
Line 44: Line 45:
----



== See also ==

[[https://perldoc.perl.org/|perldoc]], the webhosted documentation

Perl

perl(1) is a scripting language for Unix systems. It borrowed and built upon the syntax of Unix tools like ed and awk, and in turn inspired the PCRE (Perl Compatible Regular Expressions) and PCRE2 libraries.

This article refers to Perl 5, not Raku.


Example

print "Hello, World!\n";

Execute this file by running:

perl hello.pl

perl(1) is better known for its powerful yet obfuscated syntax, especially in the spirit of Bash one-liners. As an example (credit to Randal L. Schwartz):

perl <<<'print join " ", reverse split " ", "hacker, Perl another Just"'

Or more humorously (credit to Raymond Chen):

perl <<<'$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;'


Servers and Applications


See also

perldoc, the webhosted documentation


CategoryRicottone

Perl (last edited 2025-03-04 03:20:54 by DominicRicottone)