http://qs1969.pair.com?node_id=11138786


in reply to Re: What technical benfits perl offers over python + few more questions.
in thread What technical benfits perl offers over python + few more questions.

OP - in addition to the advice above, I'd like to point you to the concept of a modulino. If you're doing mostly scripts, this approach will allow you to walk the line between scripts and modules (libraries). Which is good for "code reuse" when it makes sense. I also highly recommend you take a look at Util::H2O. It is great for cleaning up old crust scripts that heavily use hash references (the sign of a mature Perl developer) and can make your modulinos even more pleasant to work with.

Finally, I must also point out. A lot of times it's okay to use bash. I maintain a mix of Perl and bash scripts; your tolerance and own needs will guide you where the "line" for that decision is.

  • Comment on Re^2: What technical benfits perl offers over python + few more questions.
  • Download Code

Replies are listed 'Best First'.
Re^3: What technical benfits perl offers over python + few more questions.
by ikegami (Patriarch) on Nov 15, 2021 at 16:11 UTC

    Which is good for "code reuse"

    Doing

    package Modulino; sub main { } caller() ? 1 : main;
    perl "$( perldoc -lm Modulino )"
    is not better for code reuse over the traditional
    package Modulino; sub main { } 1
    perl -MModulino -emain