It's documented, see
perlglossary for "expression".
The point is you can't reuse this coding style very often, so better avoid it.
You can write sub func (&@) { } to use block syntax. like in func {shift()+1 } 1..10
Or you can directly pass function references f(\&g(\&h),1..10)
or anonymous subs f(sub {...},1..10)
without using prototypes at all.
But Perl won't allow you to rewrite anything like func EXPR, LIST acting like map does.
And as I said have a look into HOP.
Please understand that I won't go further into details of a theoretical discussion, I'd rather prefer to see a real use case from you such that we can recommend the Perl way to do it.
Cheers Rolf
( addicted to the Perl Programming Language)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.