Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: What technical benfits perl offers over python + few more questions.

by perlfan (Vicar)
on Nov 13, 2021 at 16:34 UTC ( [id://11138786]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found