Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by perlfan (Curate)
on Apr 11, 2008 at 20:47 UTC ( #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
Node Status?
node history
Node Type: note [id://679852]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-07-12 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls