Oh never mind.

It helps when you chomp your keyword list as you read it in.

Me so silly sometimes.

Entities should not be multiplied unnecessarily.

Janitor note: Original content follows:

I have a lot of perl scripts that I need to port / fix so they run under *nix. Among other issues, the author wasnt Case sEnsitive when He typeD in database Names, File names or aNy other Type of name. >:/

We're talking about several thousand lines of Nonstandard Naming conVentions.

I want to build a search and replace script to fix these with a hash of accepted words in the right case. Can someone tell me why this wont work as I want it to?

open ...yadayadayada while ( ) { foreach $word (keys ( %keywords) ) { s/$word/$word/ig; } print OUT $_; }

I didnt think it would be THIS easy but I cant seem to find the quick solution.

Thanks for the help!

-David

Original content restored by Arunbear.


In reply to swap problems by Bagarre

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.