Perl500503Syntax-OrDie
view release on metacpan or search on metacpan
doc/perldelta_summary.txt view on Meta::CPAN
In 5.005_03, the mode argument is required: mkdir(PATH, MODE).
----------------------------------------------------------------------
perl58delta (Perl 5.8.0, 2002-07-18)
----------------------------------------------------------------------
use encoding
Loads a source encoding pragma (e.g. "use encoding 'euc-jp'").
PerlIO layers in open() and binmode()
Specifying I/O layers such as :utf8, :encoding(UTF-8), :crlf
in the mode string: open(FH, ">:utf8", $path).
Not available in 5.005_03 (no PerlIO infrastructure).
----------------------------------------------------------------------
perl5100delta (Perl 5.10.0, 2007-12-18)
----------------------------------------------------------------------
// defined-or operator
Returns left-hand side if defined, otherwise right-hand side.
"$x // $y" is equivalent to "defined($x) ? $x : $y".
//= defined-or assignment
"$x //= $y" sets $x to $y if $x is not defined.
say LIST
Like print but appends a newline.
state VARIABLE
Lexically-scoped persistent variable (like static in C).
given(EXPR) { when(VAL) { ... } }
Switch/case construct (experimental in 5.10, removed in 5.36+).
~~ smart-match operator
Overloaded comparison operator for various types.
use feature
Enables named language features (say, state, switch, etc.).
\K in regex
Resets the start of the matched string (keep).
"foo\Kbar" matches "bar" in "foobar" but does not include "foo".
(?<name>...) named capture group
Stores a capture in %+ under the given name.
\k<name> named backreference
References a named capture group by name.
(?|...) branch reset group
Capture group numbers reset for each alternative.
(*VERB) backtrack control verbs
(*FAIL), (*ACCEPT), (*PRUNE), (*SKIP), (*MARK), (*COMMIT), (*THEN).
\h \H horizontal whitespace escapes
\v \V vertical whitespace escapes
\R generic newline escape
UNITCHECK { } phase block
Runs at the end of compiling each individual compilation unit.
Possessive quantifiers a++ a*+ a?+ a{n,m}+
Quantifier that does not give back on backtracking.
(?PARNO) (?+N) (?-N) recursive subpattern by number
(?&name) recursive subpattern by name
(?R) recurse to start of entire pattern
${^MATCH} ${^PREMATCH} ${^POSTMATCH}
Equivalents of $&, $`, $' when /p flag is used (no speed penalty).
\g{N} \g{-N} absolute and relative backreferences
----------------------------------------------------------------------
perl5120delta (Perl 5.12.0, 2010-04-12)
----------------------------------------------------------------------
package NAME VERSION
Combined package declaration and version specification in one statement.
... yada-yada operator
Placeholder for unimplemented code; throws "Unimplemented" when reached.
----------------------------------------------------------------------
perl5140delta (Perl 5.14.0, 2011-05-14)
----------------------------------------------------------------------
s/PATTERN/REPLACEMENT/r non-destructive substitution flag
Returns the modified string without changing the original.
tr/SEARCHLIST/REPLACEMENTLIST/r non-destructive transliteration flag
----------------------------------------------------------------------
perl5160delta (Perl 5.16.0, 2012-05-20)
----------------------------------------------------------------------
__SUB__
A token (enabled by "use feature 'current_sub'") that refers to
the currently-executing subroutine.
----------------------------------------------------------------------
perl5200delta (Perl 5.20.0, 2014-05-27)
----------------------------------------------------------------------
Subroutine signatures (experimental)
sub foo ($x, $y = 0) { ... }
Parameters declared in parentheses after the sub name.
Postfix dereference
$ref->@* $ref->%* $ref->&* $ref->$* $ref->@[...]
----------------------------------------------------------------------
perl5220delta (Perl 5.22.0, 2015-06-01)
----------------------------------------------------------------------
<<>> double-diamond operator
Safe version of <> that opens each ARGV file with 3-argument open.
/n non-capturing regex flag
( run in 0.602 second using v1.01-cache-2.11-cpan-9581c071862 )