Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
While I know that you did not label this "[RFC]", this looks like a good draft for a brief tutorial.

The intent was a little different, as I mentioned at the very bottom of the node: There used to be a section "Truth and Falsehood" in perlsyn that was nice and short, and easy to link to whenever someone's question touched on Perl's concept of true/false, but that section was merged into a much longer block of text in perldata, which IMHO makes it harder to provide a link to people who just want to know about that one topic. (The title is such that it's easy to link to as [Truth and Falsehood].) So I want to keep the main point of the node focused on just true/false, hence I tried to separate out the "Related Topics" so that the top is just a "TL;DR".

As currently written, this neglects $#array.

Yes, that's a good point, I'll add a brief mention of it, thanks. IMHO, the more detailed description you wrote starts getting a little off-topic to the main point of the node, so I'll keep it a little shorter.

The exists and defined tests also apply to array indexes

Not entirely; from exists:

WARNING: Calling exists on array values is strongly discouraged. The notion of deleting or checking the existence of Perl array elements is not conceptually coherent, and can lead to surprising behavior.
would it be better to say that length returns undef without producing a warning?

Yes, good point, thanks!


In reply to Re^2: Truth and Falsehood by haukex
in thread Truth and Falsehood by haukex

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found