It's not possible not to have a scope in a Perl program. Remember that a file is a block as well.

Oh I know this well. Thanks for pointing out the potential for misunderstanding, I shouldnt have assumed that everybody (especially non native english speakers) would grasp the signifigance of "enclosing". Just so you can see the point I meant Ive included the definition of "enclosing" below. (Definitions 1-3 are relevent IMO)

Enslosing at Dicitionary.Com

I'd considered using local, but then dismissed it as not necessary - the program is about to end anyway. Why have Perl save the old value of $" and restore it, if you're not going to use the old value?

Well, first off I agree (and I did say that I knew you knew this stuff :-) that in a quick and dirty that was for one-off or personal use that I might not use local. OTOH, I tend to wrap global var changes in as tight a block as I can just because once or twice Ive forgotten that I have not done so and then had to waste time finding the damn thing after the fact. This is what I mean by bad habits. Also as this answer is aimed at a newbie, I felt that pointing out the issue might avoid trouble. After all, you and I know that if we add anything after the global var assigment that we also probably will need to block in and localize the assignment. The OP probably wouldnt know such things so I felt it was prudent to add the comment to the thread.

use English "-no_match_vars"; is as old as at least 5.6.0, if not older.

Hmm, thanks, I was unaware of that option. Mostly becuase I dont use it due to its earlier reputation.

Furthermore, the program isn't using regular expressions, so the argument doesn't old anyway.

Well, I thought that the implication of saying "the module carries an unnacceptable performance penalty for programs that use regexes." was clear that it didnt apply directly here. Again, thanks for the follow up, I should take more care with my explanations.

There is however, IMO, a stronger argument to not use English.pm. The majority of the code, and the majority of the programmers out there don't use this module.

Bravo! This is indeed this is a very good argument for not using English.pm.

Cheers,


---
demerphq

<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

In reply to Re: Re: find and replace project with values coming from a table by demerphq
in thread find and replace project with values coming from a table by optiontrader

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.