in reply to Code style question

Get yourself a copy of the book 'Perl Best Practices'. There is also a module called Perl::Critic which you can run your code through and it will highlight where you are deviating from the guidelines in the book. It can be a bit annoying at first but it is highly configurable and well worth it in the long run. Here is a short introduction.

Replies are listed 'Best First'.
Re^2: Code style question
by BillKSmith (Monsignor) on May 20, 2021 at 18:07 UTC
    Perhaps the most important advice in Damion's book appears early in Chapter 2.
    All that matters is that you adopt a single, coherent style; one that works for your entire programming team. And having agreed upon that style, that you then apply it consistently across all your development.

      Note about teams sounds very reasonable.

        The definition of "team" can be expanded to refer to yourself and your future self. When you adopt a consistent style everything becomes much easier when you need to change something down the line.
Re^2: Code style question
by ikegami (Patriarch) on May 20, 2021 at 17:14 UTC

    Take suggestions with a grain of salt. But yeah, it could definitely be a rewarding experience.

    Seeking work! You can reach me at

Re^2: Code style question
by AlexP (Monk) on May 21, 2021 at 07:34 UTC

    Perl::Critic seems very interesting.

    And thanks for the book. It's not the first time I've heard about 'Perl Best Practices', so going to find my copy.

      Welcome AlexP to The Monastery

      I too am a fan of Perl Critic. Since being introduced to it here in The Monastery a few months ago, I have tested all new code against it. I especially like that different levels of scrutiny can be set. I like to get code to pass the 'stern' test but always look beyond that so I can learn...and ignore the stricter elements that don't suit my use case.

        I have big intention to start using it in the near future in all my perl projects.