Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by runrig (Abbot)
on Apr 11, 2008 at 21:19 UTC ( [id://679863]=note: print w/replies, xml ) Need Help??


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

It's not so much the length, it's whether or not perl data structures, regular expressions, modules, etc., would make the program "better". I still write Korn shell scripts, and one I'm working on now is 140 lines long (it's mainly a wrapper for some external commands), and there's currently no reason to write it in perl, though it wouldn't be too hard to do if it became necessary.

If you do program in Korn shell, I recommend learning about its (regex-like) patterns, parameter expansions, command substitutions, compound commands, background processes, and co-processes (and whatever of this that applies if it's bash or some other shell). These things can push back the need for rewriting in perl.

  • 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://679863]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2025-11-11 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 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.