you may want to have a look at the following tests
https://metacpan.org/source/DCONWAY/PPR-0.000021/t/ppi_statement_sub.t
and
https://metacpan.org/source/DCONWAY/PPR-0.000021/t/subdecl.t
I wasn't able to find examples of attributes with arguments, so better see the corresponding perldoc in perlsub#Subroutine-Attributes
Examples of valid syntax (even though the attributes are unknown): sub fnord (&\%) : switch(10,foo(7,3)) : expensive; sub plugh () : Ugly('\(") :Bad; sub xyzzy : _5x5 { ... } Examples of invalid syntax: sub fnord : switch(10,foo(); # ()-string not balanced sub snoid : Ugly('('); # ()-string not balanced sub xyzzy : 5x5; # "5x5" not a valid identifier sub plugh : Y2::north; # "Y2::north" not a simple identifier sub snurt : foo + bar; # "+" not a colon or space
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^2: Regex critique
by LanX
in thread Regex critique
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |