The first things to do are find a good place to ask questions (you've made a good start there at least), find some tutorial material (Tutorials will probably help) and find the Perl documentation which is available on line at perl. For regular expression help see perlretut and perlre.

Next you need to write a little code and see what you can manage. If (when) you run into trouble condense the problem down to a small sample that demonstrates the issue and ask us for help (we like to see evidence of a little effort anyway).

Remember to always use strictures (use strict; use warnings;) - they catch a lot of errors of all sorts earlier rather than later.

However, for your immediate task what you really want is the translation operator tr/// (look for tr/SEARCHLIST/REPLACEMENTLIST/cds under Regexp Quote Like Operators in perlop).


Perl reduces RSI - it saves typing

In reply to Re: Perl starter with big problem. by GrandFather
in thread Perl starter with big problem. by b_vulnerability

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.