Hi, so one of the greatest things about Perl is its documentation. You can find answers yourself!

I Googled for 'perl ++ operand' and got perlop - Perl operators and precedence > Auto increment and Auto decrement. (Here we increment the value stored in %seen for each key *before* making sure that we haven't already seen this key by checking that the value *after* incrementing is less than 2. Also makes use of Perl's autovivification.)

For -n and -E and all other command line switches for the perl executable, see perlrun - how to execute the Perl interpreter.

Note that the doc I first pointed you to, perlintro, contains links to all these docs in the overview it gives of each topic. Have you yet allocated a couple of hours of your time to read that document? Seems fair, when you are getting other Monks to give of their time to you.


The way forward always starts with a minimal test.

In reply to Re^5: Perl regex by 1nickt
in thread Perl regex by Nicpetbio23!

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.