in reply to Re^7: Recomendations For Learning perl?
in thread Recomendations For Learning perl?

Wow! I totally missed that. Yes, it is amazing how one line can achieve so much. Even as a beginner, I feel that I pressure myself to keep my code as concise as possible, thus, I like to achieve a lot with little code, though it does get confusing at times. Your breakdown of the program is very detailed and helpful! I was eager to try the program myself, so I installed the recommended module, copied the code and ran it. I did not have words installed, so I took care of that as well. The output is not as expected. I tried Steve's one-liner below and that works correctly for what it is supposed to do. But the output for your program is below:

Replies are listed 'Best First'.
Re^9: Recomendations For Learning perl? -- be wise
by Discipulus (Canon) on Dec 08, 2016 at 21:38 UTC
    Even as a beginner, I feel that I pressure myself to keep my code as concise as possible

    this can be a sign of the dark size of the source..

    Concise for humans does not immediately means faster for compilers; speed is one of last priorities and must be measured.

    When you code your goal is quality.

    Concise and clever musto go after readable and maintenable see this post thread for an example.

    Once some monks said: Dont code at your best. Being to debug twice difficult than write code, you'll not be able to debug, by definition

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      This post was quite helpful. I appreciate your recommendations. I do tend to assume that my "efficiency" will result in time saving. I will rectify this.

Re^9: Recomendations For Learning perl?
by 1nickt (Canon) on Dec 08, 2016 at 21:10 UTC

    Please show the first few lines of the word file. And the command you ran on your command line. It looks like it's searching for the number `1` :-/ What OS are you using?

    And note that you don;t have to use the <spoiler> tags for only a few lines, say up to about 50 :-)

    The way forward always starts with a minimal test.
        and the command?
        The way forward always starts with a minimal test.