in reply to Running a command from a text file
You can execute a shell-script as if it were any other system command ... but I would caution you to be very careful with this. Generally speaking, when I am reading a piece of source-code to understand how it works, I do not want to have to branch-off to read another source-file, especially not one that is written in a totally different language and especially not one that in effect steps-away from the Perl context completely to do whatever it does. If this file contains a single line, I’d rather see that single-line within the Perl source. And I must say that I am not too keen on “one-liners” much either, because brevity sacrifices clarity. These practices are much less maintainable than other alternative choices for doing the same things, and I would strongly encourage you to champion maintainability as much as it makes sense in your work.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Running a command from a text file
by pvaldes (Chaplain) on May 21, 2014 at 19:26 UTC |