Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
A list is different from a scalar.
A list is different from a scalar.

(I had to repeat that to myself many times when first learning Perl.)

I don't see length as cut and dried as you do. It's easy to say, "What's the length of that piece of lumber?" and people understand what you mean. That's unambiguous. It's harder to say "What's the length of that pile of lumber over there?" and get a good answer.

Do you mean, "Please measure the base of the pile?" or "How long is the average piece of wood?" or "What's the expiration date?"

Perl goes to great lengths (pardon the pun) to express the differences between a thing and a pile of stuff. Unlike C, a string-in-a-scalar isn't the same as an array of characters. It's something fundamental to the language. You can chop it up in little pieces. You can build a birdhouse out of it. You can whack someone in the head with it for not using strict.

I'm not going to say that everything in Perl is 100% okay yes sir perfect, but I will say that once you understand context, things make a lot more sense.

In reply to Re: Apparent Inconsistencies in Perl Function Naming by chromatic
in thread Apparent Inconsistencies in Perl Function Naming by princepawn

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2017-11-24 04:46 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (344 votes). Check out past polls.