Thanks to everyone for their helpful responses.
Actually, I was trying to keep my post brief, but I ended up leaving out too much information and still getting helpful information, but not the exact information I was seeking.

Ok, here's the story:
I'm parsing a config file and I'm running into a parameter that has a value like $$NETOBJ.parameter. I want to remove the $$NETOBJ. part and be left with parameter. The code I submitted earlier was a little test that I had put together, but I mistyped it. Here is my test program as I was using it:

#!/usr/local/bin/perl $a = "$$NETOBJ.parameter"; $a =~ s/\$\$NETOBJ\.//; print $a;
Earlier, I typed use strict; out of habit. I usually use it, but left it out for this small example.
What the code above gives me is .parameter. My question is: Why doesn't my regexp remove the dot? I don't need to know how to create the value because I'm already reading it from the config file. I need to know how to remove the dot.

Sorry again for not being more specific. Thank you all for your feedback.

Tii


In reply to RE: Re: Need help with s/// by Tii
in thread Need help with s/// by Tii

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.