in reply to Rules of Thumb, Stereotypes, and other misleading "knowledge"

Why not use a heredoc instead:

my $option_spec = <<SPEC; Version: $VERSION ... $SCRIPT_NAME -$SPLIT_MAP_FILE_PARM RV900_split_map -$OUTPUT_PREF +IX_OPT RV900 -$VERBOSE_OPT *.dlog SPEC

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: Rules of Thumb, Stereotypes, and other misleading "knowledge"
by QM (Parson) on Feb 07, 2006 at 04:37 UTC
    Why not use a heredoc instead:
    Yes, well, I had a good reason somewhere, I know I did, I just mislaid it.

    Actually, I always have to look up whether it's "<<HERE" or <<"HERE". And then there's the balanced delimiter aspect. So I've cornered myself into qq{...}, even though the terminator's not as obvious as HEREDOCs. (Vaguely reminds me of all that in-band/out-of-band signalling discussion.)

    But you're right, I should be more practical and simple, and less esoteric. I should use a bubble level instead of a laser sight, because last time I checked, it was pretty easy to use a bubble -- no batteries to run down, no beam to get in your eyes. If it's broken, it's pretty obvious.

    I think everyone should learn how to use a slide rule before they're allowed to use a calculator. Or an old fashioned manual typewriter before writing a letter on a computer. No one ever lost a day's work on a typewriter because of a power outage.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      Yes, well, I had a good reason somewhere, I know I did, I just mislaid it.

      Actually, I always have to look up whether it's "<<HERE" or <<"HERE". And then there's the balanced delimiter aspect. So I've cornered myself into qq{...}, even though the terminator's not as obvious as HEREDOCs. (Vaguely reminds me of all that in-band/out-of-band signalling discussion.)

      Ok, you had me up to here. I'm thinking, "This is a pretty good reminder to think outside of any box you've put yourself into." Then you go off in an undeserved (and off-topic) tangent. I'm curious as to what, precisely, you have to gain by giving such an absurd argument? Are you hoping to denigrate GrandFather's reasonable question, and thus, by extention, denigrate GrandFather for even asking it?

      If you think GrandFather is missing the point of your meditation, just say so. Don't belittle him with absurd strawmen as if he had brought those up, too.

      Personally, I don't think GrandFather missed the point at all. Even if he had, he was pointing out what he learned from the meditation, which is completely on topic.

      Remember: Quality isn't about fixing bugs, it's about preventing them. (Ok, that's a previous meditation of mine) And GrandFather is pointing out how to prevent this bug instead of remembering how to fix it.

      Meanwhile, even if you were using HEREDOCs, your point still stands for other common uses of braces - hash refs, eval blocks, anonymous subs, etc., as well as any less common ones, such as the delimiter to the quote operators (q, qq, qw, qx), or other short letter operators (m, s, y or tr).

      GrandFather was merely focusing on the one case you presented. Rather than belittle him for it, simply point out the other cases, and I'm betting GrandFather would just nod his head, say, "Oh, okay, good point," and we could continue in a civilised manner. He wasn't telling you your meditation was bad - just asking a legitimate question which deserves a legitimite answer. ("I forget why" counts, as does "I never remember the HEREDOC syntax")

        I wasn't belittling GrandFather, I was engaging in some self-deprecation. I actually appreciate his contributions, so it never occured to me that someone would take my comments that way (especially him).
        Yes, well, I had a good reason somewhere, I know I did, I just mislaid it.
        This is known as a sorry-a$$ excuse. I should have marked it with <facetious> or something more creative.

        In the midst of all that, somewhere I neglected to say, "Thanks GrandFather, that's a good suggestion." Oh wait, here it is...

        But you're right, I should be more practical and simple, and less esoteric. I should use a bubble level instead of a laser sight, because last time I checked, it was pretty easy to use a bubble -- no batteries to run down, no beam to get in your eyes. If it's broken, it's pretty obvious.
        So I think you misread between the lines (if that's possible).

        Cheers,

        -QM
        --
        Quantum Mechanics: The dreams stuff is made of