Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^5: Automating execution of shell scripts

by AnomalousMonk (Bishop)
on Sep 20, 2021 at 18:33 UTC ( #11136885=note: print w/replies, xml ) Need Help??

in reply to Re^4: Automating execution of shell scripts
in thread Automating execution of shell scripts

I guess it would be better (also faster?) if it is done in the main program and not in a subroutine ...

A highly questionable guess IMHO. Reasonable factoring of code into subroutines certainly has the benefits of increased clarity and maintainability, encapsulation, etc., as you mention. The only speed advantage of inlining might be in a case in which you are calling a relatively simple function a gazillion times in a program. In the typical case, Perl call-return overhead vanishes into the background of a script.

(And yes, please see Short, Self-Contained, Correct Example.)

Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^6: Automating execution of shell scripts
by wisely (Initiate) on Sep 23, 2021 at 08:57 UTC
    Hi Bill and AnomalousMonk,
    I will make sure to review this and keep it in mind for the next time I need help on some code and come back to post here.
    In any case thank you all for the help with resolving the issues with the code.
    Cheers guys!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2022-01-18 17:44 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (53 votes). Check out past polls.