diff options
Diffstat (limited to 'pod/perlsyn.pod')
-rw-r--r-- | pod/perlsyn.pod | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 205be7d97a..1d0f5d694f 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -47,7 +47,7 @@ subroutine without defining it by saying C<sub name>, thus: Note that it functions as a list operator, not as a unary operator; so be careful to use C<or> instead of C<||> in this case. However, if you were to declare the subroutine as C<sub myname ($)>, then -C<myname> would functonion as a unary operator, so either C<or> or +C<myname> would function as a unary operator, so either C<or> or C<||> would work. Subroutines declarations can also be loaded up with the C<require> statement @@ -409,6 +409,18 @@ or $nothing = 1; } +or, using experimental C<EVAL blocks> of regular expressions +(see L<perlre/"(?{ code })">), + + / ^abc (?{ $abc = 1 }) + | + ^def (?{ $def = 1 }) + | + ^xyz (?{ $xyz = 1 }) + | + (?{ $nothing = 1 }) + /x; + or even, horrors, if (/^abc/) |