Using tail ? Good. But this is indeed a special case, because it is so easy to use and because it is so trivial.
The problem as a whole is not really efficacy or tolerance, which is largely irrelevant; The problem is easy to use. To run an external utility, you need to find out what arguments it takes, write code to convert your program data structures to this format, bring them correctly, create a command line and launch the application. Then you may have to pass data in and read data from it (including complexity, such as an event loop, worry about deadlock, etc.) and finally interpret the return value. (UNIX processes consider "0" to be true and something else is false, but Perl suggests otherwise. foo() and die hard to read.) This is a lot of work, and therefore people avoid it. It is much easier to instantiate a class and call methods on it to get the data you need.
(You can abstract processes this way, for example, see Crypt :: GpgME. It handles the complexity associated with calling gpg , which usually involves creating multiple file descriptors other than STDOUT, STDIN, and STDERR, among others.)
source share