> Where can I read about functions that have comma and non-comma parsings?

in my own words:

BLOCK means { code } in curlies, like map { $_ +1 } 1..3, so no comma

DB<124> map { $_ +1 } 1..3 => (2, 3, 4)

EXPR can be any "atomar" code-snippet.

DB<128> map sqrt , 1..3 => (1, "1.4142135623731", "1.73205080756888") DB<129> map 5 , 1..3 => (5, 5, 5)

in both cases the list values are passed by setting a special variable (aka default variable) $_

according to perlglossary

BLOCK A syntactic construct consisting of a sequence of Perl stat +ements that is delimited by braces. The "if" and "while" statemen +ts are defined in terms of BLOCKs, for instance. Sometimes we als +o say "block" to mean a lexical scope; that is, a sequence of sta +tements that act like a "BLOCK", such as within an eval or a file, +even though the statements aren’t delimited by braces. ... expression Anything you can legally say in a spot where a "value" is required. Typically composed of literals, variables, opera +tors, functions, and "subroutine" calls, not necessarily in that +order.

Cheers Rolf

( addicted to the Perl Programming Language)


In reply to Re^5: map sub to list? (glossary) by LanX
in thread map sub to list? by pldanutz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.