Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: At what point do you rewrite that old shell script in Perl?

by perlfan (Parson)
on Apr 11, 2008 at 20:47 UTC ( [id://679852]=note: print w/replies, xml ) Need Help??


in reply to At what point do you rewrite that old shell script in Perl?

When you have to start munging data or can't readily rely on commandline utilities to do what you need but stringing them together with pipes, it is time to switch from shell to Perl.

In general, a shell program should not be that large or take too many commandline options. For that matter, Perl utilities shouldn't either. No script, no matter what language, should be too big - nor should it be a kitchen sink type app that tries to do too much. Remember, do one thing, and do it well :)

I suggest trying to keep to small shell scripts that bind together specialized utilities. You may find it nicer to create the specialized utilities in Perl, then use them inside of a shell script. The unix "everything is a filter" mantra works pretty well, too, if you separate things properly.

  • Comment on Re: At what point do you rewrite that old shell script in Perl?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2025-11-11 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (67 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.