<pedantic> Four of the seven things you cited (if, else, for, while) aren't really functions, per se, but are flow-control "operators" well, not "operators", exactly, but keywords in syntactic constructions. </pedantic>

You may have noticed, in the full perlfunc man page, how the functions can be grouped into categories, and some of those categories are quite specialized -- some are even OS-specific (check the section about "Portability").

To the extent that your normal coding tasks don't take you through some of those categories, you never happen to need those functions. So what? It's good enough to have a vague sense about the categories that are out there, and then you just learn the functions as you need them (i.e. if you don't need them, don't bother and don't worry about it).

As for PHP's 3000 functions, I suppose that probably relates to having a different perspective on "modularizing" code, and having a different threshold for the trade-off between creating a uniform run-time environment (bloated with functions that will only be used by 5% of PHP programmers), vs. managing a site-specific module library (where processes only load the functions they use, but there's somewhat more care needed for maintenance).

If you counted up everything provided via supplemental CPAN modules, the total number of functions available in Perl is surely an order of magnitude greater than 3000. Thankfully, you really only need to learn about the ones that are relevant to your task. (But then, sometimes you have to figure out which of several alternative sets of functions would be best -- not a simple or linear task.)


In reply to Re: functional functions by graff
in thread functional functions by punkish

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.