Perl is a programming language created in 1987 by Larry Wall.
Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Read more on Wikipedia...
#13on PLDB | 35Years Old | 492.0kUsers |
print("Hello, world!\n");
#!/usr/bin/perl
print "Hello World\n";
# Hello world in perl
print "Hello World!\n";
#!/usr/local/bin/perl
print "Perl\n"
#!/usr/bin/perl
use strict;
use warnings;
use IO::Handle;
my ( $remaining, $total );
$remaining = $total = shift(@ARGV);
STDOUT->autoflush(1);
while ( $remaining ) {
printf ( "Remaining %s/%s \r", $remaining--, $total );
sleep 1;
}
print "\n";
__DATA__ else lock qw __END__ elsif lt qx __FILE__ eq m s __LINE__ exp ne sub __PACKAGE__ for no tr and foreach or unless cmp ge package until continue gt q while CORE if qq xor do le qr y
Feature | Supported | Example | Token |
---|---|---|---|
Binary Literals | β | # 0b[01]+(_[01]+)* |
|
Integers | β | # \d+(_\d+)* |
|
Floats | β | # (?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)? |
|
Hexadecimals | β | # 0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)* |
|
Octals | β | # 0_?[0-7]+(_[0-7]+)* |
|
Conditionals | β | ||
While Loops | β | ||
Print() Debugging | β | ||
Range Operator | β | # https://users.cs.cf.ac.uk/Dave.Marshall/PERL/node38.html @array = (1..10); |
|
Operator Overloading | β | ||
Multiple Inheritance | β | ||
File Imports | β | use Digest::MD5 'md5_hex'; |
|
Directives | β | # In Perl, the keyword "use", which imports modules, can also be used to specify directives, such as use strict; or use utf8; use utf8; |
|
Line Comments | β | # A comment |
# |
MultiLine Comments | β | =begin =cut | |
Comments | β | # This is a comment in perl =begin comment This is all part of multiline comment. You can use as many lines as you like These comments will be ignored by the compiler until the next =cut is encountered. =cut |
|
Partial Application | β | sub first-and-last ( $first, $last ) { say "Name is $first $last"; } my &surname-smith = &first-and-last.assuming( *, 'Smith' ); &surname-smith.( 'Joe' ); # OUTPUT: Β«Name is Joe Smithβ€Β» |
|
Regular Expression Syntax Sugar | β | print "Hello World".match(/\w/) |
|
Strings | β | "hello world" |
|
Semantic Indentation | Ο΄ |
repo | stars | description |
---|---|---|
FlameGraph | 8342 | Stack trace visualizer |
webmin | 1077 | Powerful and flexible web-based server management control panel |
cloc | 7923 | "cloc counts blank lines comment lines and physical lines of source code in many programming languages." |
owasp-modsecurity-crs | 1828 | OWASP ModSecurity Core Rule Set (CRS) Project (Official Repository) |
nikto | 3232 | Nikto web server scanner |
title | author | year | reviews | ratings | rating |
---|---|---|---|---|---|
Programming Perl | Tom Christiansen | 1991 | 52 | 2104 | 4.04 |
Advanced Perl Programming (Perl Series) | Sriram Srinivasan | 1997 | 1 | 201 | 3.93 |
Effective Perl Programming | Joseph Hall | 1997 | 10 | 103 | 4.22 |
Perl for Dummies | Paul E. Hoffman | 1997 | 5 | 48 | 3.42 |
The Perl CD Bookshelf: Perl in a Nutshell/Programming Perl, 2nd Edition/Perl Cookbook/Advanced Perl Programming/Learning Perl, 2nd Edition/Learning Perl on WIN32 Systems | O'Reilly Media Inc. | 1999 | 0 | 27 | 4.11 |
Programming the Perl DBI | Tim Bunce | 2000 | 3 | 77 | 3.47 |